File tree Expand file tree Collapse file tree 2 files changed +14
-8
lines changed
playbooks/roles/ocp-csi-driver Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,9 @@ Requirements
15
15
16
16
- Running OCP 4.x cluster is needed.
17
17
- Cluster must not contain default StorageClass.
18
- - A secret with PowerVC certificate in the ` default ` namespace.
19
- Secret name must be ` powervc-certificate ` and must contains ` certificate ` field.
18
+ - Optional :
19
+ - A secret with PowerVC certificate in the ` default ` namespace
20
+ Secret name should be ` powervc-certificate ` and must contains ` certificate ` field.
20
21
eg.
21
22
22
23
```
Original file line number Diff line number Diff line change 117
117
name : powervc-certificate
118
118
namespace : default
119
119
register : powervc_certificate
120
+ ignore_errors : yes
120
121
121
- - name : Fail if the powervc-certificate does not exists in default namespace
122
- fail :
122
+ - name : If the powervc-certificate does not exists in default namespace
123
+ debug :
123
124
msg : " PowerVC certificate secret is not present!"
124
125
when : powervc_certificate.resources | length == 0
125
126
126
- - fail :
127
+ - name : Debug if the PowerVC certificate is empty or missing
128
+ debug :
127
129
msg : " PowerVC certificate is empty! Please check the certificate's secret."
128
- when : >
129
- (powervc_certificate.resources[0].data.certificate is not defined) or
130
- (powervc_certificate.resources[0].data.certificate | length == 0)
130
+ when :
131
+ powervc_certificate.resources | length != 0 and
132
+ (
133
+ powervc_certificate.resources[0].data.certificate is not defined or
134
+ powervc_certificate.resources[0].data.certificate | length == 0
135
+ )
131
136
132
137
- name : Create namespace for CSI driver validation
133
138
k8s :
You can’t perform that action at this time.
0 commit comments