From b0142125ded059da547b6acd6e3ed6c1c6d75d07 Mon Sep 17 00:00:00 2001 From: ace Date: Thu, 11 May 2023 14:12:15 +0300 Subject: [PATCH] fix listen_addr and listen_port --- defaults/main.yaml | 3 ++- templates/pgbouncer.ini.j2 | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/defaults/main.yaml b/defaults/main.yaml index 7fcbfd3..0e677c5 100644 --- a/defaults/main.yaml +++ b/defaults/main.yaml @@ -5,7 +5,8 @@ pgbouncer_log_dir: "/var/log/pgbouncer" pgbouncer_pid_dir: "/tmp" pgbouncer_pid_name: "pgbouncer.pid" pgbouncer_log_name: "pgbouncer.log" -pgbouncer_listen_port: 6432 +pgbouncer_listen_addr: '0.0.0.0' +pgbouncer_listen_port: '6432' pgbouncer_systemd_user: "pgbouncer" pgbouncer_systemd_group: "pgbouncer" pgbouncer_max_client_conn: 10000 diff --git a/templates/pgbouncer.ini.j2 b/templates/pgbouncer.ini.j2 index e7249b8..6898e01 100644 --- a/templates/pgbouncer.ini.j2 +++ b/templates/pgbouncer.ini.j2 @@ -18,8 +18,8 @@ server_tls_sslmode = {{ pgbouncer_server_tls_sslmode }} {% endif %} logfile = {{ pgbouncer_log_dir }}/{{ pgbouncer_log_name }} pidfile = {{ pgbouncer_pid_dir }}/{{ pgbouncer_pid_name }} -listen_addr = {{ pgbouncer_listen_addr | default('0.0.0.0') }} -listen_port = {{ pgbouncer_listen_port | default('6432') }} +listen_addr = {{ pgbouncer_listen_addr }} +listen_port = {{ pgbouncer_listen_port }} unix_socket_dir = /var/run/postgresql auth_type = {{ pgbouncer_auth_type }} auth_file = {{ pgbouncer_auth_file }}