2016-09-23 22:03:13 +07:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: COMMAND | GET debian.cnf from primary node
|
|
|
|
command: cat /etc/mysql/debian.cnf
|
|
|
|
register: debiancnf
|
|
|
|
delegate_to: '{{ mysql_galera_primary_node }}'
|
2016-09-27 22:37:43 +07:00
|
|
|
changed_when: false
|
2016-09-23 22:03:13 +07:00
|
|
|
|
|
|
|
- name: COMMAND | Get current debian.cnf
|
|
|
|
command: cat /etc/mysql/debian.cnf
|
|
|
|
register: ondc
|
2016-09-27 22:37:43 +07:00
|
|
|
changed_when: false
|
2016-09-23 22:03:13 +07:00
|
|
|
|
|
|
|
- block:
|
|
|
|
|
|
|
|
- name: SERVICE | Stop MariaDB
|
|
|
|
service: name=mysql state=stopped
|
|
|
|
|
|
|
|
- name: COPY | Paste primary node's debian.cnf
|
|
|
|
copy: >
|
|
|
|
content={{ debiancnf.stdout }}
|
|
|
|
dest=/etc/mysql/debian.cnf
|
|
|
|
mode=0600
|
|
|
|
owner=root
|
|
|
|
group=root
|
|
|
|
register: paste
|
|
|
|
|
|
|
|
- name: SERVICE | Start MariaDB
|
|
|
|
service: name=mysql state=started
|
|
|
|
|
|
|
|
when: debiancnf.stdout != ondc.stdout
|