|
@@ -73,11 +73,14 @@
|
|
- name: Reset pkg_mft before looking for it
|
|
- name: Reset pkg_mft before looking for it
|
|
set_fact:
|
|
set_fact:
|
|
pkg_mft: ''
|
|
pkg_mft: ''
|
|
|
|
+ found_chn: ''
|
|
|
|
|
|
- name: Weed out the manifest we need
|
|
- name: Weed out the manifest we need
|
|
set_fact:
|
|
set_fact:
|
|
pkg_mft: '{{ pkg_mft_samecat | community.general.json_query("resources[?status.packageName == `" + op.op_pkg + "`]") }}'
|
|
pkg_mft: '{{ pkg_mft_samecat | community.general.json_query("resources[?status.packageName == `" + op.op_pkg + "`]") }}'
|
|
|
|
|
|
|
|
+ - debug: var=pkg_mft
|
|
|
|
+
|
|
- name: Search for any channels that provide desired_csv
|
|
- name: Search for any channels that provide desired_csv
|
|
set_fact:
|
|
set_fact:
|
|
found_chn: '{{ (pkg_mft | community.general.json_query("status.channels[?currentCSV == `" + op.desired_csv + "`].name")) }}'
|
|
found_chn: '{{ (pkg_mft | community.general.json_query("status.channels[?currentCSV == `" + op.desired_csv + "`].name")) }}'
|
|
@@ -85,12 +88,14 @@
|
|
- pkg_mft is defined
|
|
- pkg_mft is defined
|
|
- pkg_mft != ''
|
|
- pkg_mft != ''
|
|
|
|
|
|
|
|
+ - debug: var=found_chn
|
|
|
|
+
|
|
- name: Fail if no channel provides the desired_csv
|
|
- name: Fail if no channel provides the desired_csv
|
|
fail:
|
|
fail:
|
|
msg: No {{ op.op_pkg }} channel provides {{ op.desired_csv }}
|
|
msg: No {{ op.op_pkg }} channel provides {{ op.desired_csv }}
|
|
when:
|
|
when:
|
|
- found_chn is defined
|
|
- found_chn is defined
|
|
- - found_chn | length == 0
|
|
|
|
|
|
+ - found_chn == ''
|
|
|
|
|
|
- name: Fail if selected channel does not provide the desired_csv
|
|
- name: Fail if selected channel does not provide the desired_csv
|
|
fail:
|
|
fail:
|