Files
wrestlingdev-ansible/roles/masterdb/tasks/main.yml

14 lines
463 B
YAML

---
# 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"