Kaynağa Gözat

make stuff just work for now

Grega Bremec 7 ay önce
ebeveyn
işleme
f03098eb6e
1 değiştirilmiş dosya ile 23 ekleme ve 22 silme
  1. 23 22
      playbooks/roles/deploy-operator/tasks/main.yml

+ 23 - 22
playbooks/roles/deploy-operator/tasks/main.yml

@@ -11,28 +11,29 @@
 #
 # NOTE: Do NOT test by checking for presence of API resources - they do not always get cleaned up.
 #
-- name: Check if the CSV exists already
-  k8s_info:
-    kubeconfig: tmp/kubeconfig-ocp4
-    validate_certs: no
-    api_version: operators.coreos.com/v1alpha1
-    kind: clusterserviceversion
-  register: all_csv
-
-- name: Find the wanted CSV among all CSVs
-  set_fact:
-    found_csv: "{{ (all_csv | community.general.json_query(\"resources[?metadata.name == \" + desired_csv + \"]\")) }}"
-  when:
-    - all_csv.resources is defined
-    - (all_csv.resources | length) > 0
-
-- name: Get details about the CSV if found
-  set_fact:
-    csv_ns: "{{ found_csv[0] | community.general.json_query('metadata.namespace') }}"
-    csv_name: "{{ found_csv[0] | community.general.json_query('metadata.name') }}"
-  when:
-    - found_csv is defined
-    - (found_csv | length) > 0
+# TODO: Maybe someday fix the JSONPath expression below. And figure out why check for a CSV.
+#- name: Check if the CSV exists already
+#  k8s_info:
+#    kubeconfig: tmp/kubeconfig-ocp4
+#    validate_certs: no
+#    api_version: operators.coreos.com/v1alpha1
+#    kind: clusterserviceversion
+#  register: all_csv
+#
+#- name: Find the wanted CSV among all CSVs
+#  set_fact:
+#    found_csv: "{{ (all_csv | community.general.json_query(\"resources[?metadata.name == \" + desired_csv + \"]\")) }}"
+#  when:
+#    - all_csv.resources is defined
+#    - (all_csv.resources | length) > 0
+#
+#- name: Get details about the CSV if found
+#  set_fact:
+#    csv_ns: "{{ found_csv[0] | community.general.json_query('metadata.namespace') }}"
+#    csv_name: "{{ found_csv[0] | community.general.json_query('metadata.name') }}"
+#  when:
+#    - found_csv is defined
+#    - (found_csv | length) > 0
 
 - name: Make sure the namespace is there
   k8s: