2015-08-11 15:22:58 +07:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: MYSQL_REPLICATION | Stop slave
|
2021-09-02 23:17:54 +07:00
|
|
|
community.mysql.mysql_replication:
|
2018-03-18 00:28:56 +07:00
|
|
|
mode: stopslave
|
2015-08-11 15:22:58 +07:00
|
|
|
|
2019-12-29 01:02:41 +07:00
|
|
|
- name: MYSQL_REPLICATION | Configure master host
|
2021-09-02 23:17:54 +07:00
|
|
|
community.mysql.mysql_replication:
|
2019-12-29 01:02:41 +07:00
|
|
|
mode: changemaster
|
|
|
|
master_host: "{{ mariadb_replication_host }}"
|
|
|
|
master_port: "{{ mariadb_replication_port }}"
|
|
|
|
master_user: "{{ mariadb_replication_user }}"
|
|
|
|
master_password: "{{ mariadb_replication_password }}"
|
2021-09-01 17:24:40 +07:00
|
|
|
no_log: "{{ not mariadb_debug_role }}"
|
2019-12-29 01:02:41 +07:00
|
|
|
|
2021-09-02 23:17:54 +07:00
|
|
|
- name: MYSQL_REPLICATION | Setup replication with GTID
|
|
|
|
community.mysql.mysql_replication:
|
|
|
|
primary_use_gtid: current_pos
|
2015-08-11 15:22:58 +07:00
|
|
|
|
|
|
|
- name: MYSQL_REPLICATION | Start slave
|
2021-09-02 23:17:54 +07:00
|
|
|
community.mysql.mysql_replication:
|
2018-03-18 00:28:56 +07:00
|
|
|
mode: startslave
|