Template for master slave mariadb configuration

This commit is contained in:
2016-02-02 08:35:34 -05:00
parent dbd43ecb7a
commit d3c83613bb
7 changed files with 60 additions and 28 deletions

View File

@@ -0,0 +1,13 @@
---
# This sets up the wrestlingtourney database and starts the binlogs
# https://mariadb.com/blog/devops-mariadb-part-1
# https://mariadb.com/blog/devops-mariadb-and-ansible-part-2
- name: Modify configuration file to setup server ID
lineinfile: dest=/etc/mysql/my.cnf regexp="^#server-id" line="server-id=1"
- name: Restart mysql service
service: name=mysql state=restarted
- name: Reset master binlog
command: /usr/bin/mysql -u root -e "RESET MASTER"