Template for master slave mariadb configuration
This commit is contained in:
13
roles/masterdb/tasks/main.yml
Normal file
13
roles/masterdb/tasks/main.yml
Normal 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"
|
||||
Reference in New Issue
Block a user