|
@@ -50,15 +50,26 @@
|
|
block:
|
|
block:
|
|
|
|
|
|
# Check if package provides desired_csv in any of the channels
|
|
# Check if package provides desired_csv in any of the channels
|
|
- - name: Get packagemanifest
|
|
|
|
|
|
+ # XXX Due to the idiotic fact that some operators from different catalogs
|
|
|
|
+ # have the same manifest name, this needs to be a two-phase query.
|
|
|
|
+ # XXX First, query for all operators from the desired catalog.
|
|
|
|
+ - name: Get packagemanifests from same catalog
|
|
k8s_info:
|
|
k8s_info:
|
|
kubeconfig: tmp/kubeconfig-ocp4
|
|
kubeconfig: tmp/kubeconfig-ocp4
|
|
validate_certs: no
|
|
validate_certs: no
|
|
api_version: packages.operators.coreos.com/v1
|
|
api_version: packages.operators.coreos.com/v1
|
|
kind: packagemanifest
|
|
kind: packagemanifest
|
|
namespace: openshift-marketplace
|
|
namespace: openshift-marketplace
|
|
- name: "{{ op.op_pkg }}"
|
|
|
|
- register: pkg_mft
|
|
|
|
|
|
+ label_selectors:
|
|
|
|
+ - "catalog = {{ op.op_cat }}"
|
|
|
|
+ register: pkg_mft_samecat
|
|
|
|
+
|
|
|
|
+ # XXX Then, search for the operator that has the status.packageName we need.
|
|
|
|
+ - 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
|
|
- name: Search for any channels that provide desired_csv
|
|
set_fact:
|
|
set_fact:
|