]> git.immae.eu Git - github/fretlink/ansible-postgresql-role.git/commitdiff
tests: adding a database creation with extensions
authorPaul B <paul@bonaud.fr>
Fri, 25 Jan 2019 12:38:57 +0000 (13:38 +0100)
committerPaul B <paul@bonaud.fr>
Tue, 29 Jan 2019 10:42:40 +0000 (11:42 +0100)
.travis.yml
test/main.yml

index 7a72289e592acf3b57890195c94e72d9bba027cb..c4244115312284330f1aa2f05b2857c50d6db893 100644 (file)
@@ -13,7 +13,7 @@ addons:
 
 install:
   # Install ansible
-  - pip install ansible
+  - pip install ansible docker-py docker
   # Check ansible version
   - ansible --version
   - ansible-galaxy install -r test/requirements.yml -p test/roles/
@@ -21,6 +21,8 @@ install:
 script:
   # Basic role syntax check
   - ansible-playbook test/main.yml -i test/hosts --syntax-check
+  # Run the tests
+  - ansible-playbook test/main.yml -i test/hosts
 
 notifications:
   webhooks: https://galaxy.ansible.com/api/v1/notifications/
index 625819985ceff6bc51a2714e843851aeaf98987f..bc9d27cb2bd000dff47209dc15691d3311b943c5 100644 (file)
             archive_enabled: True
             barman_directory: "{{ postgres_barman_directory }}"
             users:
+              - username: tester
+                password: tester
               - username: barman
                 password: "secret_cocktail"
                 permissions: 'SUPERUSER'
               - username: replicator
                 password: "secret_repli"
                 permissions: 'REPLICATION'
+            databases:
+              - dbname: test_database
+                owner: tester
+                extensions:
+                  - description: PostGis
+                    apt_deps:
+                      - "postgresql-{{ postgres_version }}-postgis"
+                    names:
+                      - postgis
+                      - postgis_topology
+                      - btree_gist
 
       with_items:
         - postgres_one