zun: Use assert on checks for readability
assert will also fail when we're not meeting the conditions, makes clear what we're actually testing, and isn't listed as a skipped task when the condition is ok. Change-Id: Iffb84aa14b930eb82cf2043add721c1717ca6c74
This commit is contained in:
parent
2b88144c05
commit
8d29f0718c
@ -49,10 +49,9 @@
|
|||||||
- inventory_hostname in groups['zun-cni-daemon']
|
- inventory_hostname in groups['zun-cni-daemon']
|
||||||
|
|
||||||
- name: Ensure kuryr enabled for zun
|
- name: Ensure kuryr enabled for zun
|
||||||
fail:
|
assert:
|
||||||
msg: "kuryr is required but not enabled"
|
that: enable_kuryr | bool
|
||||||
|
fail_msg: "kuryr is required but not enabled"
|
||||||
run_once: True
|
run_once: True
|
||||||
changed_when: false
|
|
||||||
when:
|
when:
|
||||||
- enable_zun | bool
|
- enable_zun | bool
|
||||||
- not enable_kuryr | bool
|
|
||||||
|
Loading…
Reference in New Issue
Block a user