-
Notifications
You must be signed in to change notification settings - Fork 43
/
incr-mysqldbbackup.yml
49 lines (42 loc) · 1.25 KB
/
incr-mysqldbbackup.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
- hosts: bahmni-emr
sudo: yes
roles:
- { role: httpd-maintenance, maintenance_status: start }
- hosts: bahmni-emr
tasks:
- name: Stop openmrs
systemd: name=openmrs state=stopped
when: db == 'openmrs' and (passive is not defined or passive != 'yes')
become: yes
- hosts: bahmni-reports
tasks:
- name: Stop bahmni-reports
systemd: name=bahmni-reports state=stopped
when: db == 'bahmni_reports' and (passive is not defined or passive != 'yes')
become: yes
ignore_errors: true
- hosts: bahmni-emr-db
become: yes
roles:
- { role: mysql-db-backup-incr, when: "db == 'openmrs'" }
- hosts: bahmni-reports-db
become: yes
roles:
- { role: mysql-db-backup-incr, when: "db == 'bahmni_reports'" }
- hosts: bahmni-emr
tasks:
- name: Start openmrs
systemd: name=openmrs state=started
when: db == 'openmrs' and (passive is not defined or passive != 'yes')
become: yes
- hosts: bahmni-reports
tasks:
- name: Start bahmni-reports
systemd: name=bahmni-reports state=started
when: db == 'bahmni_reports' and (passive is not defined or passive != 'yes')
become: yes
ignore_errors: true
- hosts: bahmni-emr
sudo: yes
roles:
- { role: httpd-maintenance, maintenance_status: end }