File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 11---
2+
23- name : Create example-cnf facts
34 set_fact :
45 app_version : v0.2.6
7374 when :
7475 - dci_change_dir is defined
7576
77+ - name : Create the preflight_operators_to_certify variable
78+ when :
79+ - certify_operators | default(false) | bool
80+ - example_cnf_index_image is defined
81+ block :
82+ - name : Get Catalog Data
83+ ansible.builtin.shell :
84+ cmd : >
85+ set -e -o pipefail;
86+ ~/clusterconfigs-{{ cluster_name }}/opm render
87+ {% if mc_pullsecret is defined %}
88+ --authfile {{ mc_pullsecret }}
89+ {% endif %}
90+ {{ example_cnf_index_image }} |
91+ jq -r '.relatedImages[].image'
92+ args :
93+ executable : /bin/bash
94+ register : catalog_data_cmd
95+ retries : 1
96+ delay : 5
97+ until :
98+ - catalog_data_cmd.rc == 0
99+
100+ - name : Create an empty preflight_operators_to_certify variable
101+ ansible.builtin.set_fact :
102+ preflight_operators_to_certify : []
103+
104+ - name : Populate the preflight_operators_to_certify variable
105+ ansible.builtin.set_fact :
106+ preflight_operators_to_certify : " {{ preflight_operators_to_certify + [dict(bundle_image=item, index_image=example_cnf_index_image)] }}"
107+ when : ' "bundle@" in item'
108+ loop : " {{ catalog_data_cmd.stdout_lines }}"
109+
110+ - name : Display the prefight_operators_to_certify variable
111+ ansible.builtin.debug :
112+ msg : " {{ preflight_operators_to_certify }}"
113+
76114- name : " Create CNF Namespace"
77115 community.kubernetes.k8s :
78116 state : present
You can’t perform that action at this time.
0 commit comments