Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # defaults/main.yml
- ...
- mysql_server_id: "1"
- mysql_max_binlog_size: "100M"
- mysql_binlog_format: "ROW"
- mysql_expire_logs_days: "10"
- mysql_replication_role: master
- mysql_replication_master: '127.0.0.1'
- # Same keys as `mysql_users` above.
- mysql_replication_user:
- - name: replication
- host: "%"
- password: replication
- priv: "*.*:REPLICATION SLAVE,REPLICATION CLIENT"
- # tasks/replication.yml
- - name: Ensure replication user exists on master.
- mysql_user:
- name: "{{ mysql_replication_user.name }}"
- host: "{{ mysql_replication_user.host | default('%') }}"
- password: "{{ mysql_replication_user.password }}"
- priv: "{{ mysql_replication_user.priv | default('*.*:REPLICATION SLAVE,REPLICATION CLIENT') }}"
- state: present
- when: >
- (mysql_replication_role == 'master')
- and mysql_replication_user
- and (mysql_replication_master != '')
- ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement