Correct bugs with Patroni tasks on Ansible 2.14

This commit is contained in:
Joshua Boniface 2024-11-07 02:01:03 -05:00
parent f5fe9c1f70
commit 6d75b33d17
1 changed files with 10 additions and 8 deletions

View File

@ -55,8 +55,8 @@
failed_when: check_output.stdout == "" failed_when: check_output.stdout == ""
- name: stop and mask patroni service on followers to perform database upgrade (later) - name: stop and mask patroni service on followers to perform database upgrade (later)
service: systemd_service:
name: patroni name: patroni.service
state: stopped state: stopped
masked: yes masked: yes
run_once: yes run_once: yes
@ -67,10 +67,12 @@
shell: shell:
cmd: "sudo -u postgres /usr/bin/pg_dumpall > upgrade_dump.sql" cmd: "sudo -u postgres /usr/bin/pg_dumpall > upgrade_dump.sql"
chdir: "/var/lib/postgresql" chdir: "/var/lib/postgresql"
run_once: yes
delegate_to: "{{ patroni_leader }}"
- name: stop and mask patroni service on leader to perform database upgrade (later) - name: stop and mask patroni service on leader to perform database upgrade (later)
service: systemd_service:
name: patroni name: patroni.service
state: stopped state: stopped
masked: yes masked: yes
run_once: yes run_once: yes
@ -498,8 +500,8 @@
shell: "/usr/share/zookeeper/bin/zkCli.sh -server {{ ansible_hostname }}:2181 deleteall /patroni/pvc" shell: "/usr/share/zookeeper/bin/zkCli.sh -server {{ ansible_hostname }}:2181 deleteall /patroni/pvc"
- name: start patroni service on leader - name: start patroni service on leader
service: systemd_service:
name: patroni name: patroni.service
state: started state: started
masked: no masked: no
@ -535,8 +537,8 @@
loop: "{{ patroni_followers }}" loop: "{{ patroni_followers }}"
- name: start patroni service on followers - name: start patroni service on followers
service: systemd_service:
name: patroni name: patroni.service
state: started state: started
masked: no masked: no
run_once: yes run_once: yes