Reorganize some bootstrap tasks

This commit is contained in:
2023-09-01 15:42:19 -04:00
parent 0bf86fc5e8
commit 5cbce17bd1
5 changed files with 50 additions and 16 deletions

View File

@ -19,10 +19,12 @@
shell: "/usr/share/zookeeper/bin/zkCli.sh stat /nodes 2>&1 | grep -q 'Node does not exist'"
register: cluster_init
failed_when: no
run_once: yes
- name: bootstrap a fresh cluster
shell: /usr/bin/pvc init
when: cluster_init.rc == 0 and ansible_local.host_id == 1
when: cluster_init.rc == 0
run_once: yes
- name: stop and disable unneccessary services
service:
@ -32,6 +34,9 @@
with_items:
- pdns.service
- include: remove_cluster_ips.yml
when: newhost.changed
- name: start and enable services
service:
name: "{{ item }}"