-
Notifications
You must be signed in to change notification settings - Fork 3
/
build-configs.yml
247 lines (211 loc) · 5.59 KB
/
build-configs.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
---
- name: Prepare Virt Environments config path
hosts: localhost
tasks:
- name: Create logs path
file:
path: /root/upgrade-venvs/logs
state: directory
- name: Create logs path for keystone
file:
path: /root/upgrade-venvs/logs/keystone
state: directory
- name: Create logs path for glance
file:
path: /root/upgrade-venvs/logs/glance
state: directory
- name: Create logs path for cinder
file:
path: /root/upgrade-venvs/logs/cinder
state: directory
- name: Create logs path for nova
file:
path: /root/upgrade-venvs/logs/nova
state: directory
- name: Create logs path for neutron
file:
path: /root/upgrade-venvs/logs/neutron
state: directory
- name: Create logs path for designate
file:
path: /root/upgrade-venvs/logs/designate
state: directory
- name: Create logs path for heat
file:
path: /root/upgrade-venvs/logs/heat
state: directory
- name: Create config path
file:
path: /root/upgrade-venvs/configs
state: directory
- name: Get config files from keystone container
hosts: keystone_all[0]
tasks:
- synchronize:
src: /etc/keystone
dest: /root/upgrade-venvs/configs
mode: pull
recursive: true
rsync_opts:
- "-a"
- name: Get config files from glance container
hosts: glance_all[0]
tasks:
- synchronize:
src: /etc/glance
dest: /root/upgrade-venvs/configs
mode: pull
recursive: true
rsync_opts:
- "-a"
- name: Get config files from cinder container
hosts: cinder_all[0]
tasks:
- synchronize:
src: /etc/cinder
dest: /root/upgrade-venvs/configs
mode: pull
recursive: true
rsync_opts:
- "-a"
- name: Get config files from nova container
hosts: nova_all[0]
tasks:
- synchronize:
src: /etc/nova
dest: /root/upgrade-venvs/configs
mode: pull
recursive: true
rsync_opts:
- "-a"
- name: Get config files from neutron container
hosts: neutron_server_container[0]
tasks:
- synchronize:
src: /etc/neutron
dest: /root/upgrade-venvs/configs
mode: pull
recursive: true
rsync_opts:
- "-a"
- name: Get config files from designate container
hosts: designate_all[0]
tasks:
- synchronize:
src: /etc/designate
dest: /root/upgrade-venvs/configs
mode: pull
recursive: true
rsync_opts:
- "-a"
- name: Get config files from heat container
hosts: heat_all[0]
tasks:
- synchronize:
src: /etc/heat
dest: /root/upgrade-venvs/configs
mode: pull
recursive: true
rsync_opts:
- "-a"
- name: Verify configs and logs are in place
hosts: localhost
tasks:
- name: remove directory if it exists
file:
path: /etc/keystone
state: absent
- name: Create symbolic link
file:
src: /root/upgrade-venvs/configs/keystone
dest: /etc/keystone
state: link
- name: Create symbolic link
file:
src: /root/upgrade-venvs/logs/keystone
dest: /var/log/keystone
state: link
- name: remove directory if it exists
file:
path: /etc/glance
state: absent
- name: Create symbolic link
file:
src: /root/upgrade-venvs/configs/glance
dest: /etc/glance
state: link
- name: Create symbolic link
file:
src: /root/upgrade-venvs/logs/glance
dest: /var/log/glance
state: link
- name: remove directory if it exists
file:
path: /etc/cinder
state: absent
- name: Create symbolic link
file:
src: /root/upgrade-venvs/configs/cinder
dest: /etc/cinder
state: link
- name: Create symbolic link
file:
src: /root/upgrade-venvs/logs/cinder
dest: /var/log/cinder
state: link
- name: remove directory if it exists
file:
path: /etc/nova
state: absent
- name: Create symbolic link
file:
src: /root/upgrade-venvs/configs/nova
dest: /etc/nova
state: link
- name: Create symbolic link
file:
src: /root/upgrade-venvs/logs/nova
dest: /var/log/nova
state: link
- name: remove directory if it exists
file:
path: /etc/neutron
state: absent
- name: Create symbolic link
file:
src: /root/upgrade-venvs/configs/neutron
dest: /etc/neutron
state: link
- name: Create symbolic link
file:
src: /root/upgrade-venvs/logs/neutron
dest: /var/log/neutron
state: link
- name: remove directory if it exists
file:
path: /etc/designate
state: absent
- name: Create symbolic link
file:
src: /root/upgrade-venvs/configs/designate
dest: /etc/designate
state: link
- name: Create symbolic link
file:
src: /root/upgrade-venvs/logs/designate
dest: /var/log/designate
state: link
- name: remove directory if it exists
file:
path: /etc/heat
state: absent
- name: Create symbolic link
file:
src: /root/upgrade-venvs/configs/heat
dest: /etc/heat
state: link
- name: Create symbolic link
file:
src: /root/upgrade-venvs/logs/heat
dest: /var/log/heat
state: link