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:
Erik Berg 2023-01-09 17:20:04 +01:00
parent 2b88144c05
commit 8d29f0718c
No known key found for this signature in database
GPG Key ID: 1182D19B0E5ED030

View File

@ -49,10 +49,9 @@
- inventory_hostname in groups['zun-cni-daemon']
- name: Ensure kuryr enabled for zun
fail:
msg: "kuryr is required but not enabled"
assert:
that: enable_kuryr | bool
fail_msg: "kuryr is required but not enabled"
run_once: True
changed_when: false
when:
- enable_zun | bool
- not enable_kuryr | bool