add galera.cnf for first node
This commit is contained in:
@ -31,6 +31,20 @@
|
||||
dest: /srv/mariadb/etc/mysql
|
||||
mode: 660
|
||||
|
||||
- name: Set galara.cnf on first node if we have at least three nodes.
|
||||
copy:
|
||||
src: files/galera-master.cnf
|
||||
dest: /srv/mariadb/etc/mysql/conf.d/galera.cnf
|
||||
mode: 660
|
||||
when: ansible_nodename == hostname_node0 and hostvars[groups['mariadb']]|length >= 3
|
||||
|
||||
- name: Set galara.cnf on other nodes if we have at least three nodes.
|
||||
copy:
|
||||
src: files/galera-slave.cnf
|
||||
dest: /srv/mariadb/etc/mysql/conf.d/galera.cnf
|
||||
mode: 660
|
||||
when: ansible_nodename != hostname_node0 and hostvars[groups['mariadb']]|length >= 3
|
||||
|
||||
- command: systemctl daemon-reload
|
||||
|
||||
- name: make sure service is started
|
||||
|
Reference in New Issue
Block a user