add variables for admin_users and stats_users to access on the pgbouncer console
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|2791|12|2779|11|:-1:
Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/262//ansiblelint">Evolix » ansible-roles » unstable #262</a>
gitea/ansible-roles/pipeline/head This commit looks good
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|2791|12|2779|11|:-1:
Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/262//ansiblelint">Evolix » ansible-roles » unstable #262</a>
gitea/ansible-roles/pipeline/head This commit looks good
This commit is contained in:
parent
81e1d1b0c1
commit
9f87049ee4
|
@ -36,4 +36,18 @@ The value of `hash` can be obtained by running this command on the PostgreSQL se
|
|||
|
||||
> These accounts must exist on the PostegreSQL server.
|
||||
|
||||
The variables `pgbouncer_admin_users` and `pgbouncer_stats_users` list the SQL user can be access on pgbouncer console. This variables can be defines like this :
|
||||
|
||||
```
|
||||
pgbouncer_admin_users:
|
||||
- account1
|
||||
- account2
|
||||
```
|
||||
|
||||
```
|
||||
pgbouncer_stats_users:
|
||||
- account1
|
||||
- account2
|
||||
```
|
||||
|
||||
The full list of variables (with default values) can be found in `defaults/main.yml`.
|
||||
|
|
|
@ -6,4 +6,8 @@ pgbouncer_auth_type: "scram-sha-256"
|
|||
|
||||
pgbouncer_databases: []
|
||||
|
||||
pgbouncer_admin_users: []
|
||||
|
||||
pgbouncer_stats_users: []
|
||||
|
||||
pgbouncer_account_list: []
|
|
@ -3,16 +3,19 @@
|
|||
ansible.builtin.apt:
|
||||
name: pgbouncer
|
||||
state: present
|
||||
|
||||
- name: Limit for PgBouncer is set
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/default/pgbouncer
|
||||
line: ulimit -n 65536
|
||||
notify: Restart PgBouncer
|
||||
|
||||
- name: Add config file for PgBouncer
|
||||
ansible.builtin.template:
|
||||
src: pgbouncer.ini.j2
|
||||
dest: /etc/pgbouncer/pgbouncer.ini
|
||||
notify: Restart PgBouncer
|
||||
|
||||
- name: Populate userlist.txt
|
||||
ansible.builtin.template:
|
||||
src: userlist.txt.j2
|
||||
|
|
|
@ -14,6 +14,9 @@ unix_socket_dir =
|
|||
auth_type = {{ pgbouncer_auth_type }}
|
||||
auth_file = /etc/pgbouncer/userlist.txt
|
||||
|
||||
admin_users = {{ pgbouncer_admin_users | join(",") }}
|
||||
stats_users = {{ pgbouncer_stats_users | join(",") }}
|
||||
|
||||
# La connexion au serveur redevient libre lorsque le client termine une transaction
|
||||
# Autres valeurs possibles : session (lorsque le client ferme la session), statement (lorsque la requête se termine)
|
||||
pool_mode = transaction
|
||||
|
|
Loading…
Reference in a new issue