add loop control and remove no_log
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Robert Kaussow 2019-10-27 16:56:16 +01:00
parent f7c9ce8fff
commit f546144c57
4 changed files with 6 additions and 6 deletions

View File

@ -91,5 +91,3 @@ postgres_hba_entries:
auth_method: md5 auth_method: md5
postgres_hba_entries_extra: [] postgres_hba_entries_extra: []
postgres_no_log: True

View File

@ -10,7 +10,6 @@
db: "demo" db: "demo"
postgres_dbs: postgres_dbs:
- name: demo - name: demo
postgres_no_log: False
roles: roles:
- role: xoxys.postgres - role: xoxys.postgres

View File

@ -13,7 +13,8 @@
password: "{{ item.password | password_hash('sha512', 65534 | random(seed=inventory_hostname) | string) }}" password: "{{ item.password | password_hash('sha512', 65534 | random(seed=inventory_hostname) | string) }}"
state: "{{ item.state | default('present') }}" state: "{{ item.state | default('present') }}"
loop: "{{ postgres_users }}" loop: "{{ postgres_users }}"
no_log: "{{ postgres_no_log }}" loop_control:
label: "{{ item.name }}"
when: item.pam_user | default(False) when: item.pam_user | default(False)
- name: Setup client authentication - name: Setup client authentication

View File

@ -16,8 +16,9 @@
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: "{{ postgres_no_log }}"
loop: "{{ postgres_dbs + postgres_dbs_extra }}" loop: "{{ postgres_dbs + postgres_dbs_extra }}"
loop_control:
label: "{{ item.name }}"
become: True become: True
become_user: "{{ postgres_user }}" become_user: "{{ postgres_user }}"
@ -35,8 +36,9 @@
login_unix_socket: "{{ item.login_unix_socket | default(postgres_socket_directories[0]) }}" login_unix_socket: "{{ item.login_unix_socket | default(postgres_socket_directories[0]) }}"
port: "{{ item.port | default(omit) }}" port: "{{ item.port | default(omit) }}"
state: "{{ item.state | default('present') }}" state: "{{ item.state | default('present') }}"
no_log: "{{ postgres_no_log }}"
loop: "{{ postgres_users + postgres_users_extra }}" loop: "{{ postgres_users + postgres_users_extra }}"
loop_control:
label: "{{ item.name }}"
become: True become: True
become_user: "{{ postgres_user }}" become_user: "{{ postgres_user }}"