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