Merge "Sanity check for keystone"
This commit is contained in:
commit
dcb88fa572
@ -25,6 +25,9 @@ kolla_install_type: "binary"
|
||||
# Value set in the public_url endpoint in Keystone
|
||||
kolla_external_address: "{{ kolla_internal_address }}"
|
||||
|
||||
kolla_enable_sanity_checks: no
|
||||
|
||||
kolla_enable_sanity_keystone: "{{ kolla_enable_sanity_checks }}"
|
||||
|
||||
####################
|
||||
# Database options
|
||||
|
@ -26,3 +26,5 @@ keystone_internal_address: "{{ kolla_internal_address }}"
|
||||
|
||||
keystone_logging_verbose: "{{ openstack_logging_verbose }}"
|
||||
keystone_logging_debug: "{{ openstack_logging_debug }}"
|
||||
|
||||
openstack_keystone_auth: "{'auth_url':'{{ openstack_auth_v2.auth_url }}','username':'{{ openstack_auth_v2.username }}','password':'{{ openstack_auth_v2.password }}','project_name':'{{ openstack_auth_v2.project_name }}'}"
|
||||
|
20
ansible/roles/keystone/tasks/check.yml
Normal file
20
ansible/roles/keystone/tasks/check.yml
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
|
||||
- name: Keystone sanity checks
|
||||
command: docker exec -t kolla_ansible /usr/bin/ansible localhost
|
||||
-m kolla_sanity
|
||||
-a "service=keystone
|
||||
project=service
|
||||
user=admin
|
||||
password={{ keystone_admin_password }}
|
||||
role=admin
|
||||
region_name={{ openstack_region_name }}
|
||||
auth={{ '{{ openstack_keystone_auth }}' }}"
|
||||
-e "{'openstack_keystone_auth':{{ openstack_keystone_auth }}}"
|
||||
register: keystone_sanity
|
||||
changed_when: "{{ keystone_sanity.stdout.find('localhost | SUCCESS => ') != -1 and (keystone_sanity.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
|
||||
until: keystone_sanity.stdout.split()[2] == 'SUCCESS'
|
||||
retries: 1
|
||||
delay: 5
|
||||
run_once: True
|
||||
when: kolla_enable_sanity_keystone | bool
|
@ -7,3 +7,5 @@
|
||||
|
||||
- include: start.yml
|
||||
when: inventory_hostname in groups['keystone']
|
||||
|
||||
- include: check.yml
|
||||
|
Loading…
Reference in New Issue
Block a user