ansible-roles/pgbouncer/tasks/main.yml

25 lines
586 B
YAML
Raw Normal View History

2023-03-16 17:14:16 +01:00
---
- name: PgBouncer is installed
ansible.builtin.apt:
2023-03-16 17:14:16 +01:00
name: pgbouncer
state: present
2023-03-16 17:14:16 +01:00
- name: Limit for PgBouncer is set
ansible.builtin.lineinfile:
2023-03-16 17:14:16 +01:00
path: /etc/default/pgbouncer
2023-06-01 09:43:20 +02:00
regexp: "ulimit -n"
2023-03-16 17:14:16 +01:00
line: ulimit -n 65536
2023-06-01 09:43:20 +02:00
notify: restart pgbouncer
2023-03-16 17:14:16 +01:00
- name: Add config file for PgBouncer
ansible.builtin.template:
2023-03-16 17:14:16 +01:00
src: pgbouncer.ini.j2
dest: /etc/pgbouncer/pgbouncer.ini
2023-06-01 09:43:20 +02:00
notify: restart pgbouncer
2023-03-16 17:14:16 +01:00
- name: Populate userlist.txt
ansible.builtin.template:
2023-03-16 17:14:16 +01:00
src: userlist.txt.j2
dest: /etc/pgbouncer/userlist.txt
2023-06-01 09:43:20 +02:00
notify: restart pgbouncer