From 737b83dc8102d10b01d592eb9160708eafe01cc6 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 27 Aug 2019 22:55:28 +0200 Subject: [PATCH] remove old loop syntax --- tasks/config.yml | 2 +- tasks/install.yml | 2 +- tasks/post_tasks.yml | 2 +- tasks/prepare.yml | 2 +- tasks/tls.yml | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tasks/config.yml b/tasks/config.yml index b7e158a..5d7ac37 100644 --- a/tasks/config.yml +++ b/tasks/config.yml @@ -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) diff --git a/tasks/install.yml b/tasks/install.yml index 19aaa17..cfa6055 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -4,7 +4,7 @@ package: name: "{{ item }}" state: present - with_items: "{{ __postgres_packages }}" + loop: "{{ __postgres_packages }}" - name: Ensure data directory exists file: diff --git a/tasks/post_tasks.yml b/tasks/post_tasks.yml index c739521..17a00f8 100644 --- a/tasks/post_tasks.yml +++ b/tasks/post_tasks.yml @@ -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 }}" diff --git a/tasks/prepare.yml b/tasks/prepare.yml index 3edec11..f54e94c 100644 --- a/tasks/prepare.yml +++ b/tasks/prepare.yml @@ -17,7 +17,7 @@ package: name: "{{ item }}" state: present - with_items: + loop: - python-psycopg2 become: True become_user: root diff --git a/tasks/tls.yml b/tasks/tls.yml index 8d56c30..434b197 100644 --- a/tasks/tls.yml +++ b/tasks/tls.yml @@ -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: