Default cinder_volume_node_names to []
There are cases when cinder_volume_node_names is not defined. It was fixed for "set cinder_volume upgrade node facts from the limit option" task in loop but never for non HA task. So, standalone upgrade job fails with the following message. "msg": "The task includes an option with an undefined variable. The error was: 'cinder_volume_node_names' is undefined\n\nThe error appears to be in '/home/zuul/standalone-ansible-YpY5Oe/Standalone/upgrade_tasks_step1.yaml': line 27, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n- block:\n - name: set cinder_volume upgrade node facts in a single-node environment\n ^ here\n", This patch defaults cinder_volume_node_names to [] when cinder_volume_node_names is not defined in hiera. Closes-Bug: #1897760 Change-Id: I1145c39e379ac6579662f2bbfcc9a4d2d3e0f059
This commit is contained in:
parent
f4867675c4
commit
0f7ed0b8d5
|
@ -316,7 +316,7 @@ outputs:
|
|||
- name: set cinder_volume upgrade node facts in a single-node environment
|
||||
set_fact:
|
||||
cinder_volume_short_node_names_upgraded: "{{ cinder_volume_short_node_names }}"
|
||||
cinder_volume_node_names_upgraded: "{{ cinder_volume_node_names }}"
|
||||
cinder_volume_node_names_upgraded: "{{ cinder_volume_node_names | default([]) }}"
|
||||
cacheable: no
|
||||
when: groups['cinder_volume'] | length <= 1
|
||||
- name: set cinder_volume upgrade node facts from the limit option
|
||||
|
|
Loading…
Reference in New Issue