mirror of
https://github.com/HanXHX/ansible-mysql.git
synced 2026-03-14 11:42:09 +07:00
Galera: bootstrap don't need systemd script helper
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- set_fact:
|
- set_fact:
|
||||||
booboo: /var/lib/mysql/.ansible_galera_boostrap
|
booboo: "{{ mysql_datadir }}/.ansible_galera_boostrap"
|
||||||
|
|
||||||
- name: STAT | Bootstrap mark
|
- name: STAT | Bootstrap mark
|
||||||
stat: path={{ booboo }}
|
stat: path={{ booboo }}
|
||||||
@@ -8,12 +8,17 @@
|
|||||||
|
|
||||||
- block:
|
- block:
|
||||||
|
|
||||||
- name: COMMAND | Stop MariaDB
|
- name: SERVICE | Stop MariaDB
|
||||||
service: name=mysql state=stopped
|
service: name=mysql state=stopped
|
||||||
|
|
||||||
- name: COMMAND | Bootstrap first node
|
- name: COMMAND | Bootstrap first node (systemd)
|
||||||
command: galera_new_cluster
|
command: galera_new_cluster
|
||||||
|
when: ansible_service_mgr == 'systemd'
|
||||||
|
|
||||||
|
- name: COMMAND | Bootstrap first node (clean init)
|
||||||
|
command: '/etc/init.d/mysql bootstrap'
|
||||||
register: bootstrap_run
|
register: bootstrap_run
|
||||||
|
when: ansible_service_mgr != 'systemd'
|
||||||
|
|
||||||
when: not s.stat.exists
|
when: not s.stat.exists
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user