From 415c80f2d5280e38571254326ed0015fb59051f7 Mon Sep 17 00:00:00 2001 From: Ian van der Linde Date: Tue, 9 Apr 2024 08:20:37 +0200 Subject: [PATCH] Make pgpool2 backend flag configurable Leaving the default as ALLOW_TO_FAILOVER. --- roles/setup_pgpool2/defaults/main.yml | 1 + roles/setup_pgpool2/tasks/pgpool2_configure_backends.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/setup_pgpool2/defaults/main.yml b/roles/setup_pgpool2/defaults/main.yml index 5d18ed114..733ef73cd 100644 --- a/roles/setup_pgpool2/defaults/main.yml +++ b/roles/setup_pgpool2/defaults/main.yml @@ -49,6 +49,7 @@ pgpool2_ssl_csr_dn: EMAIL: "example@mail.com" pgpool2_service_users: [] +pgpool2_backend_flag: "ALLOW_TO_FAILOVER" # setting validate_only to true allows you to validate setup on an existing node # use_validation flag applies to deployment configuration and validation after setup diff --git a/roles/setup_pgpool2/tasks/pgpool2_configure_backends.yml b/roles/setup_pgpool2/tasks/pgpool2_configure_backends.yml index a35b5059d..27eac7aa1 100644 --- a/roles/setup_pgpool2/tasks/pgpool2_configure_backends.yml +++ b/roles/setup_pgpool2/tasks/pgpool2_configure_backends.yml @@ -36,7 +36,7 @@ }, { 'key': 'backend_flag' + ansible_loop.index0 | string, - 'value': 'ALLOW_TO_FAILOVER', + 'value': pgpool2_backend_flag, 'state': 'present', 'quoted': true }