Replication tasks in seperated directory

pull/6/head
Emilien Mantel 2015-08-21 10:10:27 +02:00
parent 96b3360904
commit 1ee8ca005b
9 changed files with 17 additions and 16 deletions

View File

@ -30,16 +30,9 @@
- name: TEMPLATE Create .my.cnf for root
template: src=root/my.cnf dest=/root/.my.cnf owner=root group=root mode=0600 backup=yes
- name: INCLUDE | Detect if server supports GTID
include: detect_gtid.yml
- name: INCLUDE | Replication Master
include: replication_master.yml
when: mysql_replication_master
- name: INCLUDE | Replication slave
include: replication_slave.yml
when: mysql_replication_slave
- name: INCLUDE | Replication
include: replication/main.yml
when: mysql_replication_master or mysql_replication_slave
- name: INCLUDE | Secure install
include: 'secure.yml'

View File

@ -10,3 +10,11 @@
( mysql_vendor == 'mariadb' and vc.msg[0][1] | version_compare('10.0.2', 'ge') ) or
( vc.msg[0][1] | version_compare('5.6.5', 'ge') )
- name: INCLUDE | Replication Master
include: master.yml
when: mysql_replication_master
- name: INCLUDE | Replication slave
include: slave.yml
when: mysql_replication_slave

View File

@ -0,0 +1,5 @@
---
- name: TEMPLATE | Deploy master configuration
template: src=../templates/etc/mysql/conf.d/50-master.cnf.j2 dest=/etc/mysql/conf.d/50-master.cnf
notify: restart mysql

View File

@ -5,7 +5,7 @@
when: mysql_slave_readonly
- name: TEMPLATE | Deploy slave configuration
template: src=etc/mysql/conf.d/51-slave.cnf.j2 dest=/etc/mysql/conf.d/51-slave.cnf
template: src=../templates/etc/mysql/conf.d/51-slave.cnf.j2 dest=/etc/mysql/conf.d/51-slave.cnf
notify: restart mysql
- name: MYSQL_REPLICATION | Get slave status

View File

@ -1,5 +0,0 @@
---
- name: TEMPLATE | Deploy master configuration
template: src=etc/mysql/conf.d/50-master.cnf.j2 dest=/etc/mysql/conf.d/50-master.cnf
notify: restart mysql