|
@@ -83,10 +83,11 @@
|
|
|
|
|
|
- name: Search for any channels that provide desired_csv
|
|
|
set_fact:
|
|
|
- found_chn: '{{ (pkg_mft | community.general.json_query("status.channels[?currentCSV == `" + op.desired_csv + "`].name")) }}'
|
|
|
+ found_chn: '{{ (pkg_mft[0] | community.general.json_query("status.channels[?currentCSV == `" + op.desired_csv + "`].name")) }}'
|
|
|
when:
|
|
|
- pkg_mft is defined
|
|
|
- pkg_mft != ''
|
|
|
+ - pkg_mft | length > 0
|
|
|
|
|
|
- debug: var=found_chn
|
|
|
|
|
@@ -102,6 +103,8 @@
|
|
|
msg: Operator {{ op.op_pkg }} selected channel {{ op.op_chn }} does not provide {{ op.desired_csv }} - {{ found_chn }}
|
|
|
when:
|
|
|
- found_chn is defined
|
|
|
+ - found_chn != None
|
|
|
+ - found_chn != ''
|
|
|
- found_chn | length > 0
|
|
|
- op.op_chn not in found_chn
|
|
|
|