-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpost-upgrade-backup.yml
53 lines (45 loc) · 1.15 KB
/
post-upgrade-backup.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
50
51
52
53
---
- name: Prepare MQ/DB services
hosts: localhost
vars_files:
- "/root/upgrades/defaults.yml"
tasks:
- name: Dump database
shell: "mysqldump --single-transaction --all-databases > {{ dbdump_dir }}/rocky-database.save"
- name: start all containers
hosts: all_containers
gather_facts: false
user: root
tasks:
- name: start a container
lxc_container:
name: "{{ container_name }}"
state: "started"
delegate_to: "{{ physical_host }}"
- name: Remove configs and logs
hosts: localhost
tasks:
- name: remove directory if it exists
file:
path: /etc/keystone
state: absent
- name: remove directory if it exists
file:
path: /etc/glance
state: absent
- name: remove directory if it exists
file:
path: /etc/cinder
state: absent
- name: remove directory if it exists
file:
path: /etc/nova
state: absent
- name: remove directory if it exists
file:
path: /etc/neutron
state: absent
- name: remove directory if it exists
file:
path: /etc/horizon
state: absent