diff --git a/validations/openstack-endpoints.yaml b/validations/openstack-endpoints.yaml index ba1a6c49b..2d941b459 100644 --- a/validations/openstack-endpoints.yaml +++ b/validations/openstack-endpoints.yaml @@ -12,16 +12,29 @@ - pre-upgrade - post-upgrade tasks: + - name: Set fact to identify if the overcloud was deployed + set_fact: + overcloud_deployed: "{{ groups['overcloud'] is defined }}" + # Check that the Horizon endpoint exists - name: Fail if the HorizonPublic endpoint is not defined fail: msg="The `HorizonPublic` endpoint is not defined in the `EndpointMap` of the deployed stack. This means Horizon may not have been deployed correctly." - when: overcloud_horizon_url|default('') == '' + when: + - overcloud_horizon_url|default('') == '' + - overcloud_deployed|bool # Check connectivity to horizon - name: Check Horizon uri: url={{ overcloud_horizon_url }} when: overcloud_horizon_url|default('') + # Check that the Keystone endpoint exists + - name: Fail if KeystoneURL output is not available + fail: msg="The `KeystoneURL` output is not available in the deployed stack." + when: + - overcloud_keystone_url|default('') == '' + - overcloud_deployed|bool + # Check that we can obtain an auth token from horizon - name: Check Keystone uri: @@ -44,8 +57,5 @@ register: auth_token when: overcloud_keystone_url|default('') - - name: Fail if KeystoneURL output is not available - fail: msg="The `KeystoneURL` output is not available in the deployed stack." - when: overcloud_keystone_url|default('') == '' # TODO(shadower): other endpoints