From 2cc1088e4d2b357ae46aeb4befb7f6328ddbac06 Mon Sep 17 00:00:00 2001 From: ira-pandey1 Date: Mon, 21 Oct 2024 14:57:12 +0530 Subject: [PATCH] review changes Signed-off-by: ira-pandey1 --- playbooks/roles/ocp-csi-driver/README.md | 36 +++++++++---------- playbooks/roles/ocp-csi-driver/tasks/main.yml | 6 ++-- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/playbooks/roles/ocp-csi-driver/README.md b/playbooks/roles/ocp-csi-driver/README.md index 7c02e899..1faba7f5 100644 --- a/playbooks/roles/ocp-csi-driver/README.md +++ b/playbooks/roles/ocp-csi-driver/README.md @@ -16,24 +16,24 @@ Requirements - Running OCP 4.x cluster is needed. - Cluster must not contain default StorageClass. - Optional : - - A secret with PowerVC certificate in the `default` namespace - Secret name should be `powervc-certificate` and must contains `certificate` field. - eg. - - ``` - apiVersion: v1 - kind: Secret - metadata: - name: powervc-certificate - namespace: default - type: Opaque - stringData: - certificate: | - -----BEGIN CERTIFICATE----- - IBAgwIBUCCAwIBAgIUn2gAbw0LWHtozBNiLdUtELvr1pyPAzcNAQYjAwDQYJKoZIhv - ... - Un2gAIBAb -----END CERTIFICATE----- - ``` +- A secret with PowerVC certificate in the `default` namespace + Secret name should be `powervc-certificate` and must contains `certificate` field. + eg. + + ``` + apiVersion: v1 + kind: Secret + metadata: + name: powervc-certificate + namespace: default + type: Opaque + stringData: + certificate: | + -----BEGIN CERTIFICATE----- + IBAgwIBUCCAwIBAgIUn2gAbw0LWHtozBNiLdUtELvr1pyPAzcNAQYjAwDQYJKoZIhv + ... + Un2gAIBAb -----END CERTIFICATE----- + ``` Role Variables -------------- diff --git a/playbooks/roles/ocp-csi-driver/tasks/main.yml b/playbooks/roles/ocp-csi-driver/tasks/main.yml index efac8e68..7645a043 100644 --- a/playbooks/roles/ocp-csi-driver/tasks/main.yml +++ b/playbooks/roles/ocp-csi-driver/tasks/main.yml @@ -124,12 +124,12 @@ msg: "PowerVC certificate secret is not present!" when: powervc_certificate.resources | length == 0 - - name: If powervc-certificate is empty - debug: + - debug: msg: "PowerVC certificate is empty! Please check the certificate's secret." when: > (powervc_certificate.resources[0].data.certificate is not defined) or - (powervc_certificate.resources[0].data.certificate | length == 0) + (powervc_certificate.resources[0].data.certificate | length == 0) or + (powervc_certificate.resources | length != 0) - name: Create namespace for CSI driver validation k8s: