Only setup mysql slave when not already setup

This commit is contained in:
Johannes Rothe 2023-09-15 22:02:56 +02:00
parent bf54e16aef
commit 08b06809f2
Signed by: onjen
GPG Key ID: 73F092605AF3286C

View File

@ -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: