remove old loop syntax

This commit is contained in:
Robert Kaussow 2019-08-27 22:55:28 +02:00
parent 3d24d6ce98
commit 737b83dc81
5 changed files with 6 additions and 6 deletions

View File

@ -12,7 +12,7 @@
name: "{{ item.name }}"
password: "{{ item.password | password_hash('sha512', 65534 | random(seed=inventory_hostname) | string) }}"
state: "{{ item.state | default('present') }}"
with_items: "{{ postgres_users }}"
loop: "{{ postgres_users }}"
no_log: True
when: item.pam_user | default(False)

View File

@ -4,7 +4,7 @@
package:
name: "{{ item }}"
state: present
with_items: "{{ __postgres_packages }}"
loop: "{{ __postgres_packages }}"
- name: Ensure data directory exists
file:

View File

@ -17,7 +17,7 @@
port: "{{ item.port | default(omit) }}"
state: "{{ item.state | default('present') }}"
no_log: True
with_items: "{{ postgres_users }}"
loop: "{{ postgres_users }}"
become: True
become_user: "{{ postgres_user }}"

View File

@ -17,7 +17,7 @@
package:
name: "{{ item }}"
state: present
with_items:
loop:
- python-psycopg2
become: True
become_user: root

View File

@ -7,7 +7,7 @@
owner: "{{ postgres_user }}"
group: "{{ postgres_group }}"
recurse: True
with_items:
loop:
- "{{ __postgres_tls_key_path | dirname }}"
- "{{ __postgres_tls_cert_path | dirname }}"
become: True
@ -19,7 +19,7 @@
src: "{{ item.src }}"
dest: "{{ item.dest }}"
mode: "{{ item.mode }}"
with_items:
loop:
- { src: "{{ postgres_tls_key_source }}", dest: '{{ __postgres_tls_key_path }}', mode: '0600' }
- { src: "{{ postgres_tls_cert_source }}", dest: '{{ __postgres_tls_cert_path }}', mode: '0750' }
loop_control: