Use module mysql_replication instead of command for GTID setup
parent
316ad91c58
commit
5a8f5b74c4
|
@ -13,14 +13,9 @@
|
||||||
master_password: "{{ mariadb_replication_password }}"
|
master_password: "{{ mariadb_replication_password }}"
|
||||||
no_log: "{{ not mariadb_debug_role }}"
|
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
|
||||||
# name: MYSQL_REPLICATION | Setup replication with GTID
|
mysql_replication:
|
||||||
# mysql_replication:
|
primary_use_gtid: current_pos
|
||||||
# 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 | Start slave
|
- name: MYSQL_REPLICATION | Start slave
|
||||||
mysql_replication:
|
mysql_replication:
|
||||||
|
|
Loading…
Reference in New Issue