update version to 16.4

keep old configs on update

set body format to json for dynamic patroni config
This commit is contained in:
ace 2024-11-03 17:11:13 +03:00
parent c8d358bbe3
commit b2b1ecf80c
Signed by: ace
GPG Key ID: 2C08973DD37A76FD
4 changed files with 6 additions and 1 deletions

View File

@ -10,7 +10,7 @@ patroni_cluster_name: "patroni-cluster"
patroni_namespace: "/service/" patroni_namespace: "/service/"
# Patroni PostgreSQL common options # Patroni PostgreSQL common options
patroni_postgresql_version: "16.3" patroni_postgresql_version: "16.4"
patroni_postgresql_install_repo: true patroni_postgresql_install_repo: true
patroni_postgresql_system_locale: "en_US.UTF-8" patroni_postgresql_system_locale: "en_US.UTF-8"
patroni_postgresql_system_language: "{{ patroni_postgresql_system_locale }}" patroni_postgresql_system_language: "{{ patroni_postgresql_system_locale }}"

View File

@ -44,6 +44,7 @@
owner: "postgres" owner: "postgres"
group: "postgres" group: "postgres"
mode: 0644 mode: 0644
backup: yes
register: patroni_config_file register: patroni_config_file
when: not patroni_config_file_exists_result.stat.exists when: not patroni_config_file_exists_result.stat.exists
notify: Restart Patroni notify: Restart Patroni
@ -55,3 +56,4 @@
owner: "postgres" owner: "postgres"
group: "postgres" group: "postgres"
mode: 0755 mode: 0755
backup: yes

View File

@ -10,6 +10,7 @@
owner: "postgres" owner: "postgres"
group: "postgres" group: "postgres"
mode: 0644 mode: 0644
backup: yes
register: patroni_dynamic_config_file register: patroni_dynamic_config_file
- name: Dynamic configuration parameters for Patroni - name: Dynamic configuration parameters for Patroni
@ -51,6 +52,7 @@
password: "{{ patroni_restapi_password }}" password: "{{ patroni_restapi_password }}"
method: PATCH method: PATCH
body: "{{ patroni_postgresql_combined_dynamic_parameters | to_nice_json }}" body: "{{ patroni_postgresql_combined_dynamic_parameters | to_nice_json }}"
body_format: json
force_basic_auth: yes force_basic_auth: yes
when: when:
- "hostvars[inventory_hostname]['role'] == 'master'" - "hostvars[inventory_hostname]['role'] == 'master'"

View File

@ -38,6 +38,7 @@
password: "{{ patroni_restapi_password }}" password: "{{ patroni_restapi_password }}"
method: POST method: POST
body: '{ "restart_pending": true }' body: '{ "restart_pending": true }'
body_format: json
force_basic_auth: yes force_basic_auth: yes
status_code: status_code:
- 200 - 200