Only restart the other nodes when bootstrapping
parent
c2f1ef522a
commit
d957d31678
|
@ -1,4 +1,12 @@
|
|||
---
|
||||
- name: SET_FACT | Prepare mark var
|
||||
ansible.builtin.set_fact:
|
||||
__mark: "{{ mariadb_datadir }}/.ansible_galera_boostrap"
|
||||
|
||||
- name: STAT | Bootstrap mark
|
||||
ansible.builtin.stat:
|
||||
path: "{{ __mark }}"
|
||||
register: s
|
||||
|
||||
- name: COMMAND | GET debian.cnf from primary node
|
||||
ansible.builtin.command: cat /etc/mysql/debian.cnf
|
||||
|
@ -38,5 +46,10 @@
|
|||
ansible.builtin.service:
|
||||
name: "{{ mariadb_service_name }}"
|
||||
state: restarted
|
||||
when:
|
||||
galeraconfig and bootstrap_run is defined and bootstrap_run['changed']
|
||||
throttle: 1
|
||||
when: not s.stat.exists or mariadb_galera_resetup
|
||||
|
||||
- name: COMMAND | Create Bootstrap mark
|
||||
ansible.builtin.command: "touch {{ __mark }}"
|
||||
args:
|
||||
creates: "{{ __mark }}"
|
||||
|
|
Loading…
Reference in New Issue