Use module mysql_replication instead of command for GTID setup

pull/44/head
Emilien Mantel 2021-09-02 14:44:44 +02:00
parent 316ad91c58
commit 5a8f5b74c4
1 changed files with 3 additions and 8 deletions

View File

@ -13,14 +13,9 @@
master_password: "{{ mariadb_replication_password }}"
no_log: "{{ not mariadb_debug_role }}"
# -- Wait this PR in Ansible released version (https://github.com/ansible/ansible/pull/62648)
# name: MYSQL_REPLICATION | Setup replication with GTID
# mysql_replication:
# master_use_gtid: current_pos
- name: COMMAND | Configure GTID
command: mariadb -e "CHANGE MASTER TO master_use_gtid=current_pos";
changed_when: true
- name: MYSQL_REPLICATION | Setup replication with GTID
mysql_replication:
primary_use_gtid: current_pos
- name: MYSQL_REPLICATION | Start slave
mysql_replication: