From 3fa894f030a57e7ef6a8d426505a0a74bae34cee Mon Sep 17 00:00:00 2001 From: Henry Geay de Montenon Date: Mon, 7 Mar 2022 16:42:00 +0100 Subject: [PATCH] changing ocs to odf for 49+ --- files/odf-operator.yaml | 29 +++++++++++++++++++++++++++++ tasks/main.yml | 11 +++++++++++ 2 files changed, 40 insertions(+) create mode 100644 files/odf-operator.yaml diff --git a/files/odf-operator.yaml b/files/odf-operator.yaml new file mode 100644 index 0000000..8a49d4e --- /dev/null +++ b/files/odf-operator.yaml @@ -0,0 +1,29 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: openshift-storage +spec: {} +--- +apiVersion: operators.coreos.com/v1 +kind: OperatorGroup +metadata: + name: openshift-storage + namespace: openshift-storage +spec: + targetNamespaces: + - openshift-storage +--- +apiVersion: operators.coreos.com/v1alpha1 +kind: Subscription +metadata: + name: odf-operator + namespace: openshift-storage + labels: + operators.coreos.com/ocs-operator.openshift-storage: '' +spec: + channel: "stable-4.9" + installPlanApproval: Automatic + name: odf-operator + source: redhat-operators + sourceNamespace: openshift-marketplace diff --git a/tasks/main.yml b/tasks/main.yml index bde06b1..b9dc31c 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -61,6 +61,17 @@ retries: 20 delay: 30 until: ocs_operator_success is not failed + when: ocp4_aio_subversion is version('4.9', operator='lt', strict=True) + +- name: Apply odf-operator configuration + k8s: + state: present + definition: "{{ lookup('file', 'odf-operator.yaml') }}" + register: ocs_operator_success + retries: 20 + delay: 30 + until: ocs_operator_success is not failed + when: ocp4_aio_subversion is version('4.9', operator='ge', strict=True) - name: Apply storage-cluster configuration k8s: