Skip to content

Commit

Permalink
feat: adds variables to enable client tls on pgbouncer (#585)
Browse files Browse the repository at this point in the history
  • Loading branch information
n-borges authored Feb 26, 2024
1 parent 78ed0cb commit 3c2d087
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion roles/pgbouncer/templates/pgbouncer.ini.j2
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ pkt_buf = 8192
listen_backlog = 4096
max_prepared_statements = {{ pgbouncer_max_prepared_statements }}
so_reuseport = 1

{% if pgbouncer_client_tls_sslmode != 'disable' %}
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 }}
{% endif %}
log_connections = 0
log_disconnections = 0

Expand Down
3 changes: 3 additions & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,9 @@ pgbouncer_auth_user: true # or 'false' if you want to manage the list of users f
pgbouncer_auth_username: pgbouncer # user who can query the database via the user_search function
pgbouncer_auth_password: "pgbouncer-pass" # please change password
pgbouncer_auth_dbname: "postgres"
pgbouncer_client_tls_sslmode: "disable"
pgbouncer_client_tls_key_file: ""
pgbouncer_client_tls_cert_file: ""

pgbouncer_pools:
- { name: "postgres", dbname: "postgres", pool_parameters: "" }
Expand Down

0 comments on commit 3c2d087

Please sign in to comment.