Skip to content

Commit

Permalink
add variables: pgbouncer_admin_users, pgbouncer_stats_users
Browse files Browse the repository at this point in the history
  • Loading branch information
vitabaks committed Nov 7, 2022
1 parent cc3a320 commit 23565bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion roles/pgbouncer/templates/pgbouncer.ini.j2
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ listen_port = {{ pgbouncer_listen_port | default(6432) }}
unix_socket_dir = /var/run/postgresql
auth_type = {{ pgbouncer_auth_type }}
auth_file = /etc/pgbouncer/userlist.txt
admin_users = postgres
admin_users = {{ pgbouncer_admin_users }}
stats_users = {{ pgbouncer_stats_users }}
ignore_startup_parameters = {{ pgbouncer_ignore_startup_parameters }}

pool_mode = {{ pgbouncer_default_pool_mode }}
Expand Down
2 changes: 2 additions & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ pgbouncer_max_client_conn: 10000
pgbouncer_max_db_connections: 1000
pgbouncer_default_pool_size: 20
pgbouncer_default_pool_mode: "session"
pgbouncer_admin_users: "postgres" # comma-separated list of users, who are allowed to change settings
pgbouncer_stats_users: "postgres" # comma-separated list of users who are just allowed to use SHOW command
pgbouncer_generate_userlist: true # generate the authentication file (userlist.txt) from the pg_shadow system table
pgbouncer_auth_type: "{{ postgresql_password_encryption_algorithm }}"
pgbouncer_ignore_startup_parameters: "extra_float_digits,geqo"
Expand Down

0 comments on commit 23565bd

Please sign in to comment.