From f0bbc128e6b463ac7c72c4893d8ec960a84199fa Mon Sep 17 00:00:00 2001 From: Julien Tachoires Date: Tue, 19 Jan 2021 17:58:00 +0100 Subject: [PATCH] Pgpool2: run PG dedicated user creation only once --- roles/setup_pgpool2/tasks/pgpool2_setup_sr_mode.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/setup_pgpool2/tasks/pgpool2_setup_sr_mode.yml b/roles/setup_pgpool2/tasks/pgpool2_setup_sr_mode.yml index 11b45c674..9e25e7f1c 100644 --- a/roles/setup_pgpool2/tasks/pgpool2_setup_sr_mode.yml +++ b/roles/setup_pgpool2/tasks/pgpool2_setup_sr_mode.yml @@ -6,6 +6,7 @@ set_fact: pgpool2_sr_check_password: >- {{ lookup('password', '/dev/null chars=ascii_letters,digits length=12') }} + run_once: true when: - pgpool2_sr_check_password|length == 0 @@ -21,6 +22,7 @@ - name: "{{ pgpool2_sr_check_user }}" pass: "{{ pgpool2_sr_check_password }}" role_attr_flags: login + run_once: true when: - pgpool2_primary_public_ip is defined - pgpool2_primary_public_ip|length > 0