diff --git a/pgbouncer/README.md b/pgbouncer/README.md index 2542f497..bf1914fc 100644 --- a/pgbouncer/README.md +++ b/pgbouncer/README.md @@ -14,6 +14,7 @@ Main variables are : * `pgbouncer_listen_port`: the listen post for PgBouncer (default: `6432`), * `pgbouncer_databases`: the databases that clients of PgBouncer can connect to, * `pgbouncer_account_list`: the accounts that clients of PgBouncer can connect to. +* `pgbouncer_auth_type`: the variable `auth_type` define by default to `scram-sha-256`, if you installed PgBouncer on PostgreSQL version inferior to 14, set this variable to `md5`. The variable `pgbouncer_databases` must have the `name`, `host` and `port` attributes. The variable can be defined like this: diff --git a/pgbouncer/defaults/main.yml b/pgbouncer/defaults/main.yml index 7b246270..4290afa5 100644 --- a/pgbouncer/defaults/main.yml +++ b/pgbouncer/defaults/main.yml @@ -2,6 +2,8 @@ pgbouncer_listen_addr: "127.0.0.1" pgbouncer_listen_port: "6432" +pgbouncer_auth_type: "scram-sha-256" + pgbouncer_databases: [] pgbouncer_account_list: [] diff --git a/pgbouncer/templates/pgbouncer.ini.j2 b/pgbouncer/templates/pgbouncer.ini.j2 index 30d34ccb..3bed0c5b 100644 --- a/pgbouncer/templates/pgbouncer.ini.j2 +++ b/pgbouncer/templates/pgbouncer.ini.j2 @@ -11,7 +11,7 @@ listen_addr = {{ pgbouncer_listen_addr }} listen_port = {{ pgbouncer_listen_port }} unix_socket_dir = -auth_type = scram-sha-256 +auth_type = {{ pgbouncer_auth_type }} auth_file = /etc/pgbouncer/userlist.txt # La connexion au serveur redevient libre lorsque le client termine une transaction @@ -26,4 +26,4 @@ default_pool_size = 20 # Ne pas enregistrer les connexions qui se passent bien log_connections = 0 -log_disconnections = 0 +log_disconnections = 0 \ No newline at end of file