Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions roles/update/tasks/reboot_hypervisor_using_cr.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
- name: Fetch NodeSets for the Reboot OpenStackDataPlaneDeployment
when: cifmw_update_node_sets is not defined
environment:
KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}"
PATH: "{{ cifmw_path | default(ansible_env.PATH) }}"
Expand All @@ -8,9 +9,21 @@
oc -n {{ cifmw_update_namespace }}
get openstackdataplanenodeset -o name
| awk -F'/' '{print $2}'
register: cifmw_update_node_sets
register: _cifmw_update_node_sets_fetch
changed_when: false

- name: Set cifmw_update_node_sets from fetch result
when: _cifmw_update_node_sets_fetch is not skipped
ansible.builtin.set_fact:
cifmw_update_node_sets: >-
{{
_cifmw_update_node_sets_fetch.stdout
| split('\n')
| map('trim')
| reject('equalto', '')
| list
}}

- name: Construct the Reboot CR name
ansible.builtin.set_fact:
cifmw_reboot_dep_name: >-
Expand All @@ -32,12 +45,7 @@
name: "{{ cifmw_reboot_dep_name }}"
namespace: "{{ cifmw_update_namespace }}"
spec:
nodeSets: "{{ cifmw_update_node_sets.stdout
| split('\n')
| map('trim')
| reject('equalto', '')
| list
}}"
nodeSets: "{{ cifmw_update_node_sets }}"
servicesOverride:
- reboot-os
ansibleExtraVars:
Expand Down
Loading