patroni: fix dynamic parameters

This commit is contained in:
ace 2023-08-30 18:27:51 +03:00
parent 9b82371789
commit 875fe5cbf2
Signed by: ace
GPG Key ID: 2C08973DD37A76FD

View File

@ -1,11 +1,11 @@
---
- name: Merge Patroni dynamic parameters for backup
set_fact:
patroni_postgresql_dynamic_parameters: "{{ patroni_postgresql_dynamic_parameters | combine(patroni_postgresql_backup_parameters, recursive=true) }}"
patroni_postgresql_combined_dynamic_parameters: "{{ patroni_postgresql_dynamic_parameters | combine(patroni_postgresql_backup_parameters, recursive=true) }}"
- name: Propagate Patroni dynamic config
copy:
content: "{{ patroni_postgresql_dynamic_parameters | to_nice_json }}"
content: "{{ patroni_postgresql_combined_dynamic_parameters | to_nice_json }}"
dest: "/etc/patroni/dynamic.json"
owner: "postgres"
group: "postgres"
@ -50,7 +50,7 @@
user: "{{ patroni_restapi_username }}"
password: "{{ patroni_restapi_password }}"
method: PATCH
body: "{{ patroni_postgresql_dynamic_parameters | to_nice_json }}"
body: "{{ patroni_postgresql_combined_dynamic_parameters | to_nice_json }}"
force_basic_auth: yes
when:
- "hostvars[inventory_hostname]['role'] == 'master'"