Add all files needed to bring up VM and run agaric.com locally
This commit is contained in:
parent
52c8b60bac
commit
4d2bc0ee24
742 changed files with 24037 additions and 0 deletions
|
@ -0,0 +1,54 @@
|
|||
---
|
||||
- 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 != '')
|
||||
|
||||
- name: Check slave replication status.
|
||||
mysql_replication:
|
||||
mode: getslave
|
||||
login_user: "{{ mysql_replication_user.name }}"
|
||||
login_password: "{{ mysql_replication_user.password }}"
|
||||
ignore_errors: true
|
||||
register: slave
|
||||
when: >
|
||||
mysql_replication_role == 'slave'
|
||||
and (mysql_replication_master != '')
|
||||
|
||||
- name: Check master replication status.
|
||||
mysql_replication: mode=getmaster
|
||||
delegate_to: "{{ mysql_replication_master }}"
|
||||
register: master
|
||||
when: >
|
||||
((slave.Is_Slave is defined and not slave.Is_Slave) or (slave.Is_Slave is not defined and slave|failed))
|
||||
and (mysql_replication_role == 'slave')
|
||||
and (mysql_replication_master != '')
|
||||
|
||||
- name: Configure replication on the slave.
|
||||
mysql_replication:
|
||||
mode: changemaster
|
||||
master_host: "{{ mysql_replication_master }}"
|
||||
master_user: "{{ mysql_replication_user.name }}"
|
||||
master_password: "{{ mysql_replication_user.password }}"
|
||||
master_log_file: "{{ master.File }}"
|
||||
master_log_pos: "{{ master.Position }}"
|
||||
ignore_errors: True
|
||||
when: >
|
||||
((slave.Is_Slave is defined and not slave.Is_Slave) or (slave.Is_Slave is not defined and slave|failed))
|
||||
and (mysql_replication_role == 'slave')
|
||||
and (mysql_replication_master != '')
|
||||
and mysql_replication_user
|
||||
|
||||
- name: Start replication.
|
||||
mysql_replication: mode=startslave
|
||||
when: >
|
||||
((slave.Is_Slave is defined and not slave.Is_Slave) or (slave.Is_Slave is not defined and slave|failed))
|
||||
and (mysql_replication_role == 'slave')
|
||||
and (mysql_replication_master != '')
|
Loading…
Add table
Add a link
Reference in a new issue