فهرست منبع

bit more debugging, fix test for found_chn

Grega Bremec 7 ماه پیش
والد
کامیت
4f7afdd22c
1فایلهای تغییر یافته به همراه6 افزوده شده و 1 حذف شده
  1. 6 1
      playbooks/roles/deploy-operator/tasks/main.yml

+ 6 - 1
playbooks/roles/deploy-operator/tasks/main.yml

@@ -73,11 +73,14 @@
     - name: Reset pkg_mft before looking for it
       set_fact:
         pkg_mft: ''
+        found_chn: ''
 
     - name: Weed out the manifest we need
       set_fact:
         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
       set_fact:
         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 != ''
 
+    - debug: var=found_chn
+
     - name: Fail if no channel provides the desired_csv
       fail:
         msg: No {{ op.op_pkg }} channel provides {{ op.desired_csv }}
       when:
         - found_chn is defined
-        - found_chn | length == 0
+        - found_chn == ''
 
     - name: Fail if selected channel does not provide the desired_csv
       fail: