mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-09 20:20:32 -07:00
mysql_replication: fix failing when using primary_use_gtid with replica_ or slave_pos (#336)
This commit is contained in:
parent
641894e6e8
commit
450cb19027
3 changed files with 5 additions and 0 deletions
changelogs/fragments
plugins/modules
tests/integration/targets/test_mysql_replication/tasks
2
changelogs/fragments/0-mysql_replication_replica_pos.yml
Normal file
2
changelogs/fragments/0-mysql_replication_replica_pos.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- mysql_replication - fails when using the `primary_use_gtid` option with `slave_pos` or `replica_pos` (https://github.com/ansible-collections/community.mysql/issues/335).
|
|
@ -532,6 +532,8 @@ def main():
|
|||
replica_term = 'REPLICA'
|
||||
else:
|
||||
replica_term = 'SLAVE'
|
||||
if primary_use_gtid == 'replica_pos':
|
||||
primary_use_gtid = 'slave_pos'
|
||||
|
||||
if mode == 'getprimary':
|
||||
status = get_primary_status(cursor)
|
||||
|
|
|
@ -75,6 +75,7 @@
|
|||
<<: *mysql_params
|
||||
login_port: '{{ mysql_replica1_port }}'
|
||||
mode: startreplica
|
||||
primary_use_gtid: replica_pos
|
||||
fail_on_error: yes
|
||||
register: result
|
||||
ignore_errors: yes
|
||||
|
|
Loading…
Add table
Reference in a new issue