-
Notifications
You must be signed in to change notification settings - Fork 3
/
prep-upgrade.yml
51 lines (45 loc) · 1.44 KB
/
prep-upgrade.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
- name: CLean up keystone admin endpoint
hosts: utility_all[0]
tasks:
- name: Create nova placement project
shell: ". /root/openrc;openstack project create placement"
- name: Delete keystone admin endpoint
shell: ". /root/openrc;openstack endpoint delete $(. /root/openrc;openstack endpoint list | grep identity | grep admin | awk '{print $2}')"
- name: Prep out machines for upgrade
hosts: all
gather_facts: false
tasks:
- name: Remove Extra Repos
file:
state: absent
path: /etc/apt/sources.list.d
- file:
state: directory
path: /etc/apt/sources.list.d
- name: Reset sources.list to default
copy:
src: /root/upgrades/sources.list
dest: /etc/apt/sources.list
owner: root
group: root
mode: '0644'
- name: Remove pip config from etc
file:
state: absent
path: /etc/pip.conf
- name: Remove pip config from root
file:
state: absent
path: /root/.pip
# if customer has 'nova_nova_conf_overrides' or 'neutron_neutron_conf_overrides' in any override files, this will negate them
#- name: Install rabbit overrides
# hosts: localhost
# gather_facts: false
# tasks:
# - name: Copy override file to openstack_deploy
# copy:
# src: /root/upgrades/rabbit_overrides.yml
# dest: /etc/openstack_deploy/rabbit_overrides.yml
# owner: root
# group: root
# mode: '0644'