add demo data base to molecule
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Robert Kaussow 2019-10-26 13:53:16 +02:00
parent dbca4b387b
commit b7a511599f
2 changed files with 4 additions and 2 deletions

View File

@ -3,6 +3,8 @@
hosts: all hosts: all
vars: vars:
postgres_repository_enabled: True postgres_repository_enabled: True
postgres_db:
- name: demo
roles: roles:
- role: xoxys.postgres - role: xoxys.postgres

View File

@ -2,7 +2,7 @@
- name: Force all notified handlers to activate pg_hba.conf - name: Force all notified handlers to activate pg_hba.conf
meta: flush_handlers meta: flush_handlers
- name: Ensure postgres databases exist - name: Ensure postgres databases are present
postgresql_db: postgresql_db:
name: "{{ item.name }}" name: "{{ item.name }}"
lc_collate: "{{ item.lc_collate | default('en_US.UTF-8') }}" lc_collate: "{{ item.lc_collate | default('en_US.UTF-8') }}"
@ -16,7 +16,7 @@
port: "{{ item.port | default(omit) }}" port: "{{ item.port | default(omit) }}"
owner: "{{ item.owner | default(omit) }}" owner: "{{ item.owner | default(omit) }}"
state: "{{ item.state | default('present') }}" state: "{{ item.state | default('present') }}"
no_log: True #no_log: True
loop: "{{ postgres_db + postgres_db_extra }}" loop: "{{ postgres_db + postgres_db_extra }}"
become: True become: True
become_user: "{{ postgres_user }}" become_user: "{{ postgres_user }}"