From a641891d08be6a46c4f9046d0210da6c55c99016 Mon Sep 17 00:00:00 2001 From: Vitaliy Kukharik Date: Tue, 17 Dec 2024 12:25:59 +0500 Subject: [PATCH] Update pgbouncer.ini.j2 --- automation/roles/pgbouncer/templates/pgbouncer.ini.j2 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/automation/roles/pgbouncer/templates/pgbouncer.ini.j2 b/automation/roles/pgbouncer/templates/pgbouncer.ini.j2 index 434037d5c..8bac8c6e3 100644 --- a/automation/roles/pgbouncer/templates/pgbouncer.ini.j2 +++ b/automation/roles/pgbouncer/templates/pgbouncer.ini.j2 @@ -39,16 +39,22 @@ so_reuseport = 1 client_tls_sslmode = {{ pgbouncer_client_tls_sslmode }} client_tls_key_file = {{ pgbouncer_client_tls_key_file }} client_tls_cert_file = {{ pgbouncer_client_tls_cert_file }} +{% if pgbouncer_client_tls_ca_file | default('') | length > 0 %} client_tls_ca_file = {{ pgbouncer_client_tls_ca_file }} +{% endif %} client_tls_protocols = {{ pgbouncer_client_tls_protocols }} client_tls_ciphers = {{ pgbouncer_client_tls_ciphers }} +{% endif %} +{% if pgbouncer_server_tls_sslmode != 'disable' %} server_tls_sslmode = {{ pgbouncer_server_tls_sslmode }} server_tls_protocols = {{ pgbouncer_server_tls_protocols }} server_tls_ciphers = {{ pgbouncer_server_tls_ciphers }} server_tls_cert_file = {{ pgbouncer_server_tls_cert_file }} server_tls_key_file = {{ pgbouncer_server_tls_key_file }} +{% if pgbouncer_server_tls_ca_file | default('') | length > 0 %} server_tls_ca_file = {{ pgbouncer_server_tls_ca_file }} {% endif %} +{% endif %} log_connections = 0 log_disconnections = 0