Guest User

Untitled

a guest
Dec 31st, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. - name: Mysql - Check master replication status.
  2. mysql_replication: mode=getmaster
  3. register: master
  4. when: mysql_replication and ansible_eth0.ipv4.address == replication_master
  5.  
  6.  
  7. - name: Mysql - Configure replication on the slave.
  8. mysql_replication:
  9. mode: changemaster
  10. master_host: "{{ replication_master }}"
  11. master_user: "{{ replication_user }}"
  12. master_password: "{{ replication_pass }}"
  13. master_log_file: "{{ master.File }}"
  14. master_log_pos: "{{ master.Position }}"
  15. ignore_errors: True
  16. when: mysql_replication and (ansible_eth0.ipv4.address != replication_master)
Add Comment
Please, Sign In to add comment