浏览代码

ignore unapproved installplans when checking for target csv

Grega Bremec 3 天之前
父节点
当前提交
6fa9827693
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      playbooks/roles/deploy-operators/tasks/main.yml

+ 1 - 1
playbooks/roles/deploy-operators/tasks/main.yml

@@ -182,7 +182,7 @@
   block:
     - name: Set a fact for the target_csv
       ansible.builtin.set_fact:
-        target_csv: "{{ sub_ip_pre[0].spec.clusterServiceVersionNames[0] }}"
+        target_csv: "{{ (sub_ip_pre | community.general.json_query('resources[?spec.approved==`true`]'))[0].spec.clusterServiceVersionNames[0] }}"
 
     - name: Announce the CSV
       ansible.builtin.debug: