mirror of
https://github.com/ansible/awx.git
synced 2024-10-30 22:21:13 +03:00
Merge pull request #2416 from fantashley/fix-openshift-auth
Fix openshift auth broken by undefined vars Reviewed-by: Ashley Nelson <fantashley@gmail.com> https://github.com/fantashley
This commit is contained in:
commit
9a580ba644
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user