38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
---
|
|
#########################################################################
|
|
# 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
|
|
|
|
- name: Create a password for PostgreSQL repl user
|
|
local_action:
|
|
module: ansible.builtin.command
|
|
cmd: "apg -M LCN -n1 -m 16"
|
|
register: patroni_postgresql_replication_password
|
|
run_once: True
|
|
|
|
- name: Create a password for PostgreSQL superuser user
|
|
local_action:
|
|
module: ansible.builtin.command
|
|
cmd: "apg -M LCN -n1 -m 16"
|
|
register: patroni_postgresql_superuser_password
|
|
run_once: True
|
|
|
|
- name: Create Patroni config file
|
|
ansible.builtin.template:
|
|
src: config.yml.j2
|
|
dest: /etc/patroni/{{ patroni_scope }}.yml
|
|
owner: root
|
|
group: root
|
|
mode: "0644" |