openstack-ansible-os_keystone/tasks/keystone_service_bootstrap.yml
Jonathan Rosser 05c64f7651 Check the service status during bootstrap against the internal VIP
This change brings the keystone role into line with others such
as cinder which check the service status using the loadbalancer.

This is useful in environments using a proxy server where the
internal VIP can be included in "no_proxy" but the service IP
for the containers are too numerous to list in "no_proxy" and
stay within the 1024 character limit for pam_env.

Change-Id: I1a4aec40618237aa23b4f40b335c141071a56f08
2022-08-08 19:07:57 +00:00

46 lines
1.6 KiB
YAML

---
# Copyright 2014, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Wait for service to be up
uri:
url: "{{ keystone_service_internaluri }}"
method: "HEAD"
status_code: 300
register: _wait_check
until: _wait_check is success
retries: 12
delay: 5
- name: Bootstrap keystone admin and endpoint
command: |
{{ keystone_bin }}/keystone-manage bootstrap \
--bootstrap-username {{ keystone_admin_user_name }} \
--bootstrap-password {{ keystone_auth_admin_password }} \
--bootstrap-project-name {{ keystone_admin_tenant_name }} \
--bootstrap-role-name {{ keystone_role_name }} \
--bootstrap-service-name {{ keystone_service_name }} \
--bootstrap-region-id {{ keystone_service_region }} \
--bootstrap-admin-url {{ keystone_service_adminuri }} \
--bootstrap-public-url {{ keystone_service_publicuri }} \
--bootstrap-internal-url {{ keystone_service_internaluri }}
no_log: true
become: yes
become_user: "{{ keystone_system_user_name }}"
changed_when: false
register: add_service
until: add_service is success
retries: 5
delay: 10