mirror of
https://github.com/ansible/awx.git
synced 2026-02-03 18:48:12 -03:30
Fix openshift auth broken by undefined vars
Signed-off-by: Ashley Nelson <fantashley@gmail.com>
This commit is contained in:
committed by
Ashley Nelson
parent
f79debac42
commit
9bec7cf3b0
@@ -29,11 +29,16 @@
|
|||||||
|
|
||||||
- name: OpenShift authentication failed on TLS verification
|
- name: OpenShift authentication failed on TLS verification
|
||||||
fail:
|
fail:
|
||||||
msg: "Failed to verify TLS, consider settings openshift_skip_tls_verify=True {{ openshift_auth_result.stderr }}"
|
msg: "Failed to verify TLS, consider settings openshift_skip_tls_verify=True {{ openshift_auth_result.stderr | default('certificate does not match hostname') }}"
|
||||||
when:
|
when:
|
||||||
- openshift_skip_tls_verify is not defined or not openshift_skip_tls_verify
|
- openshift_skip_tls_verify is not defined or not openshift_skip_tls_verify
|
||||||
- openshift_auth_result.rc != 0
|
- openshift_auth_result.rc is defined and openshift_auth_result.rc != 0
|
||||||
- openshift_auth_result.stderr | search("certificate that does not match its hostname")
|
- openshift_auth_result.stderr is defined and (openshift_auth_result.stderr | search("certificate that does not match its hostname"))
|
||||||
|
|
||||||
|
- name: OpenShift authentication failed
|
||||||
|
fail:
|
||||||
|
msg: "{{ openshift_auth_result.stderr | default('Invalid credentials') }}"
|
||||||
|
when: openshift_auth_result.rc is defined and openshift_auth_result.rc != 0
|
||||||
|
|
||||||
- name: Authenticate with OpenShift via token
|
- name: Authenticate with OpenShift via token
|
||||||
shell: |
|
shell: |
|
||||||
@@ -47,5 +52,6 @@
|
|||||||
|
|
||||||
- name: OpenShift authentication failed
|
- name: OpenShift authentication failed
|
||||||
fail:
|
fail:
|
||||||
msg: "{{ openshift_auth_result.stderr }}"
|
msg: "{{ openshift_auth_result.stderr | default('Invalid token') }}"
|
||||||
when: openshift_auth_result.rc != 0
|
when: openshift_auth_result.rc is defined and openshift_auth_result.rc != 0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user