|
@@ -32,6 +32,11 @@
|
|
- all_csv.resources is defined
|
|
- all_csv.resources is defined
|
|
- (all_csv.resources | length) > 0
|
|
- (all_csv.resources | length) > 0
|
|
|
|
|
|
|
|
+- name: Reset CSV data
|
|
|
|
+ set_fact:
|
|
|
|
+ csv_ns: ''
|
|
|
|
+ csv_name: ''
|
|
|
|
+
|
|
- name: Get details about the CSV if found
|
|
- name: Get details about the CSV if found
|
|
set_fact:
|
|
set_fact:
|
|
csv_ns: "{{ found_csv[0] | community.general.json_query('metadata.namespace') }}"
|
|
csv_ns: "{{ found_csv[0] | community.general.json_query('metadata.namespace') }}"
|
|
@@ -43,8 +48,8 @@
|
|
- debug:
|
|
- debug:
|
|
msg: Operator {{ op.op_pkg }} is already installed in {{ csv_ns }} as {{ csv_name }} (desired_csv == {{ op.desired_csv }}).
|
|
msg: Operator {{ op.op_pkg }} is already installed in {{ csv_ns }} as {{ csv_name }} (desired_csv == {{ op.desired_csv }}).
|
|
when:
|
|
when:
|
|
- - csv_ns is defined
|
|
|
|
- - csv_name is defined
|
|
|
|
|
|
+ - csv_ns != ''
|
|
|
|
+ - csv_name != ''
|
|
|
|
|
|
- name: Only proceed here if the CSV was not found anywhere yet
|
|
- name: Only proceed here if the CSV was not found anywhere yet
|
|
block:
|
|
block:
|
|
@@ -73,7 +78,7 @@
|
|
|
|
|
|
- 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("resources[0].status.channels[?currentCSV == `" + op.desired_csv + "`].name")) }}'
|
|
|
|
|
|
+ found_chn: '{{ (pkg_mft | community.general.json_query("status.channels[?currentCSV == `" + op.desired_csv + "`].name")) }}'
|
|
when:
|
|
when:
|
|
- pkg_mft is defined
|
|
- pkg_mft is defined
|
|
- pkg_mft.resources | length > 0
|
|
- pkg_mft.resources | length > 0
|