Add new oc_hosts_roles variable.
With the new upgrades workflow we need to perform a more granular upgrade node by node, instead of by role as we were doing before. For that reason, we're adding a new variable which contains all the hosts an ansible group consists of. So we can iterate over them at the time of upgrading. Change-Id: I81f4add06218ad201d4772821723154c33d4123e
This commit is contained in:
parent
8858045292
commit
db7e04bc5e
|
@ -237,6 +237,13 @@ upgrade_remove_rpm: false
|
|||
# List of roles deployed in overcloud
|
||||
oc_roles: []
|
||||
|
||||
# Dictionary with roles and hosts per role
|
||||
# oc_roles_hosts: {
|
||||
# 'Controller' : ["controller-0", "controller-1", "controller-2"],
|
||||
# 'Compute' : ["compute-0"]
|
||||
# }
|
||||
oc_roles_hosts: {}
|
||||
|
||||
# Roles upgrade order
|
||||
roles_upgrade_order: '__undefined__'
|
||||
|
||||
|
|
|
@ -30,3 +30,10 @@
|
|||
set_fact:
|
||||
oc_roles: "{{ roles_upgrade_order.split(';') }}"
|
||||
when: roles_upgrade_order != '__undefined__'
|
||||
|
||||
- name: create hosts per role fact
|
||||
vars:
|
||||
inventory_yaml: "{{ upgrade_tripleo_inventory.stdout | from_yaml }}"
|
||||
set_fact:
|
||||
oc_roles_hosts: "{{ oc_roles_hosts | combine({ item.key : inventory_yaml[item.key]['hosts'].keys() }) }}"
|
||||
with_dict: "{{ inventory_yaml.overcloud.children }}"
|
||||
|
|
Loading…
Reference in New Issue