ansible-roles/patroni/tasks/config.yml

38 lines
1.1 KiB
YAML
Raw Normal View History

2023-03-27 12:02:22 +02:00
---
2023-06-06 10:30:08 +02:00
#########################################################################
# Disabled for now
# It's too much work to completely manage a Patroni cluster from Ansible
#########################################################################
# - name: Create a password for PostgreSQL repl user
# command: "apg -M LCN -n1 -m 16"
# register: patroni_postgresql_replication_password
# check_mode: no
# - name: Create a password for PostgreSQL superuser user
# command: "apg -M LCN -n1 -m 16"
# register: patroni_postgresql_superuser_password
# check_mode: no
2023-03-27 12:02:22 +02:00
- name: Create a password for PostgreSQL repl user
2023-06-06 10:30:08 +02:00
local_action:
module: ansible.builtin.command
cmd: "apg -M LCN -n1 -m 16"
register: patroni_postgresql_replication_password
2023-06-06 10:30:08 +02:00
run_once: True
2023-03-27 12:02:22 +02:00
- name: Create a password for PostgreSQL superuser user
2023-06-06 10:30:08 +02:00
local_action:
module: ansible.builtin.command
cmd: "apg -M LCN -n1 -m 16"
register: patroni_postgresql_superuser_password
2023-06-06 10:30:08 +02:00
run_once: True
2023-03-27 12:02:22 +02:00
- name: Create Patroni config file
ansible.builtin.template:
2023-06-06 10:30:08 +02:00
src: config.yml.j2
dest: /etc/patroni/{{ patroni_scope }}.yml
2023-03-27 12:02:22 +02:00
owner: root
group: root
mode: "0644"