From 1d447c464afdf08e3df3b4f4233dc18c77690cc8 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Tue, 6 Apr 2021 14:33:15 +0200 Subject: [PATCH] Fix the loop tasks. --- tasks/postgresql-streaming-replication.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tasks/postgresql-streaming-replication.yml b/tasks/postgresql-streaming-replication.yml index 8a02328..4c91dec 100644 --- a/tasks/postgresql-streaming-replication.yml +++ b/tasks/postgresql-streaming-replication.yml @@ -15,7 +15,7 @@ value: "{{ item.value }}" loop: '{{ psql_streaming_replication_config }}' #when: postgresql_streaming_replication_primary_node == '{{ ansible_fqdn }}' - notify: Reload postgresql + notify: Restart postgresql become: True become_user: postgres @@ -31,8 +31,7 @@ address: '{{ item }}' method: 'scram-sha-256' state: present - loop: - - '{{ psql_streaming_replication_hosts }}' + loop: '{{ psql_streaming_replication_hosts }}' notify: Reload postgresql when: ansible_distribution_file_variety == "Debian" tags: [ 'postgresql', 'postgres', 'pg_conf', 'pg_hba', 'postgresql_replication' ] @@ -47,8 +46,7 @@ address: '{{ item }}' method: 'scram-sha-256' state: present - loop: - - '{{ psql_streaming_replication_hosts }}' + loop: '{{ psql_streaming_replication_hosts }}' notify: Reload postgresql when: ansible_distribution_file_variety == "RedHat" tags: [ 'postgresql', 'postgres', 'pg_conf', 'pg_hba', 'postgresql_replication' ]