ansible-mysql/tasks/replication/slave/mariadb_gtid.yml

17 lines
481 B
YAML
Raw Normal View History

---
# Need this hack before:
# - https://github.com/ansible/ansible-modules-extras/issues/817
# - https://mariadb.com/kb/en/mariadb/global-transaction-id/#switching-an-existing-old-style-slave-to-use-gtid
- name: MYSQL_REPLICATION | Stop slave
2018-03-18 00:28:56 +07:00
mysql_replication:
mode: stopslave
- name: COMMAND | Migrate to MariaDB GTID
command: mysql -e "CHANGE MASTER TO master_use_gtid=current_pos";
- name: MYSQL_REPLICATION | Start slave
2018-03-18 00:28:56 +07:00
mysql_replication:
mode: startslave