소스 검색

ignore unapproved installplans when checking for target csv

Grega Bremec 1 개월 전
부모
커밋
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: