Ensure the Patroni ZK is clean for bootstrap
This commit is contained in:
parent
06467b64ea
commit
79dd0cd4bc
|
@ -1,5 +1,17 @@
|
||||||
---
|
---
|
||||||
- name: ensure patroni services are enabled and started on this host so it becomes header
|
- name: stop patroni services
|
||||||
|
service:
|
||||||
|
name: "{{ item }}.service"
|
||||||
|
state: stopped
|
||||||
|
enabled: no
|
||||||
|
with_items:
|
||||||
|
- patroni
|
||||||
|
|
||||||
|
- name: remove any existing patroni keys in Zookeeper
|
||||||
|
command: /usr/share/zookeeper/bin/zkCli.sh rmr /patroni
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
|
- name: ensure patroni services are enabled and started on this host so it becomes leader
|
||||||
service:
|
service:
|
||||||
name: "{{ item }}.service"
|
name: "{{ item }}.service"
|
||||||
state: started
|
state: started
|
||||||
|
|
Loading…
Reference in New Issue