Make restart hander for pvcd sequential
This commit is contained in:
parent
bcce7f5445
commit
99bc566764
|
@ -19,7 +19,13 @@
|
||||||
name: patroni
|
name: patroni
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
|
# Restart pvcd, but sequentially one-host-at-a-time with a 15s wait in between; this provides
|
||||||
|
# plenty of time for the primary state to switch around without putting the cluster in a
|
||||||
|
# no-primary state
|
||||||
- name: restart pvcd
|
- name: restart pvcd
|
||||||
service:
|
shell: systemctl restart pvcd && sleep 15
|
||||||
name: pvcd
|
run_once: true
|
||||||
state: restarted
|
delegate_to: "{{ play_host }}"
|
||||||
|
with_items: "{{ play_hosts }}"
|
||||||
|
loop_control:
|
||||||
|
loop_var: play_host
|
||||||
|
|
Loading…
Reference in New Issue