2023-03-27 12:02:22 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: Create a password for PostgreSQL repl user
|
2023-03-30 18:23:46 +02:00
|
|
|
command: "apg -M LCN -n1 -m 16"
|
2023-05-12 18:12:06 +02:00
|
|
|
register: patroni_postgresql_replication_password
|
|
|
|
check_mode: no
|
2023-03-27 12:02:22 +02:00
|
|
|
|
|
|
|
- name: Create a password for PostgreSQL superuser user
|
2023-03-30 18:23:46 +02:00
|
|
|
command: "apg -M LCN -n1 -m 16"
|
2023-05-12 18:12:06 +02:00
|
|
|
register: patroni_postgresql_superuser_password
|
|
|
|
check_mode: no
|
2023-03-27 12:02:22 +02:00
|
|
|
|
|
|
|
- name: Create Patroni config file
|
|
|
|
ansible.builtin.template:
|
2023-05-12 18:12:06 +02:00
|
|
|
src: config.j2
|
|
|
|
dest: /etc/patroni/config.yml
|
2023-03-27 12:02:22 +02:00
|
|
|
owner: root
|
|
|
|
group: root
|
2023-05-12 18:12:06 +02:00
|
|
|
mode: "0644"
|