Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. # defaults/main.yml
  2. ...
  3. mysql_server_id: "1"
  4. mysql_max_binlog_size: "100M"
  5. mysql_binlog_format: "ROW"
  6. mysql_expire_logs_days: "10"
  7. mysql_replication_role: master
  8. mysql_replication_master: '127.0.0.1'
  9. # Same keys as `mysql_users` above.
  10. mysql_replication_user:
  11. - name: replication
  12. host: "%"
  13. password: replication
  14. priv: "*.*:REPLICATION SLAVE,REPLICATION CLIENT"
  15.  
  16. # tasks/replication.yml
  17. - name: Ensure replication user exists on master.
  18. mysql_user:
  19. name: "{{ mysql_replication_user.name }}"
  20. host: "{{ mysql_replication_user.host | default('%') }}"
  21. password: "{{ mysql_replication_user.password }}"
  22. priv: "{{ mysql_replication_user.priv | default('*.*:REPLICATION SLAVE,REPLICATION CLIENT') }}"
  23. state: present
  24. when: >
  25. (mysql_replication_role == 'master')
  26. and mysql_replication_user
  27. and (mysql_replication_master != '')
  28. ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement