Only setup mysql slave when not already setup
This commit is contained in:
parent
bf54e16aef
commit
08b06809f2
@ -57,7 +57,7 @@
|
||||
master_log_pos: "{{ hostvars['web1'].repl_stat.Position }}"
|
||||
master_user: "{{ mysql.replication_user }}"
|
||||
master_password: "{{ mysql_replication_pass }}"
|
||||
when: ansible_hostname in mysql.replication_slaves
|
||||
when: ansible_hostname in mysql.replication_slaves and not slave.Is_Slave
|
||||
|
||||
- name: Start slave replication
|
||||
community.mysql.mysql_replication:
|
||||
|
Loading…
x
Reference in New Issue
Block a user