validate-simple: Fix template conditional
If a task is skipped, the associated variable to be registered is in any case defined. Here, when validate_template is not "tenantvm_floatingip" the task is skipped but template_check is registered anyway, as "skipped", and it does not contain any "stat" attribute. So the next conditionals fail. Adding the original conditional to ensure we're checking for template_check.stat.exists when we're sure that template_check.stat exists too Change-Id: I62f8c1556c94c132215b760d9597488659762e6f
This commit is contained in:
parent
162ccb2699
commit
f15ba1de43
|
@ -9,12 +9,16 @@
|
|||
copy:
|
||||
src: "tenantvm_floatingip.yaml"
|
||||
dest: "{{ working_dir }}/tenantvm_floatingip.yaml"
|
||||
when: template_check is defined and not template_check.stat.exists
|
||||
when:
|
||||
- validate_template == "tenantvm_floatingip.yaml"
|
||||
- not template_check.stat.exists
|
||||
|
||||
- name: Old THT workaround, override the template path
|
||||
set_fact:
|
||||
validate_template_path: "{{ working_dir }}"
|
||||
when: template_check is defined and not template_check.stat.exists
|
||||
when:
|
||||
- validate_template == "tenantvm_floatingip.yaml"
|
||||
- not template_check.stat.exists
|
||||
|
||||
- name: Create overcloud validate script
|
||||
template:
|
||||
|
|
Loading…
Reference in New Issue