-
Notifications
You must be signed in to change notification settings - Fork 0
/
upgrade.yml
64 lines (60 loc) · 2.24 KB
/
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
52
53
54
55
56
57
58
59
60
61
62
63
64
- name: Undercloud Upgrade Validation
hosts: undercloud
gather_facts: yes
any_errors_fatal: true
tags:
- upgrade
- upgrade_repos
tasks:
- name: get undercloud version
tags: undercloud_version_discovery
vars:
discovery_types:
- rhos_release_file
- nova
import_role:
name: version-discovery
- name: Validation
include_tasks: "tasks/upgrade/validation.yml"
tags:
- validation
- upgrade_repos
- name: Undercloud Upgrade
hosts: undercloud
gather_facts: yes
any_errors_fatal: true
tags: upgrade
vars:
rhos_release_rpm: "https://url.corp.redhat.com/rhos-release-latest-rpm"
operation_type: "{{ 'Update' if install.get('update', {}).undercloud|default(False) else 'Upgrade' }}"
undercloud_upgrade_version: "{{ undercloud_version|int + (1 if install.upgrade|default(False) else 0) }}"
roles:
- role: rhos-release
release: "{{ undercloud_upgrade_version }}"
director_build: "{{ install.get('director', {}).build|default(omit) }}"
build: "{{ install.build | default(omit) }}"
mirror: "{{ install.mirror | default(omit) }}"
rr_distro_version: "{{ install.osrelease|default(omit) }}"
rr_buildmods: "{{ install.buildmods }}"
enable_testing_repos: "{{ install.get('enable', {}).get('testing', {}).repos|default(omit) }}"
tags:
- upgrade
- upgrade_repos
tasks:
- name: update TripleO client
become: true
tags:
- undercloud_containers
- upgrade
package:
name: "{{ (undercloud_upgrade_version|openstack_release < 15) | ternary('python-tripleoclient', 'python3-tripleoclient') }}"
state: latest
when: undercloud_version|openstack_release >= 13
- name: prepare undercloud containers
tags:
- undercloud_containers
- upgrade
import_tasks: tasks/prepare_uc_images.yml
when: undercloud_version|openstack_release >= 13
- name: "{{ operation_type }} to version {{ undercloud_upgrade_version }} build {{ install.build | default('latest') }}"
include_tasks: "tasks/upgrade/upgrade.yml"