Merge "Create the _member_ role in the horizon role"

This commit is contained in:
Jenkins 2016-08-19 02:03:10 +00:00 committed by Gerrit Code Review
commit 34bff50602
4 changed files with 28 additions and 1 deletions

View File

@ -7,3 +7,15 @@ project_name: "horizon"
horizon_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-horizon"
horizon_tag: "{{ openstack_release }}"
horizon_image_full: "{{ horizon_image }}:{{ horizon_tag }}"
####################
# OpenStack
####################
openstack_horizon_auth: "{'auth_url':'{{ openstack_auth.auth_url }}','username':'{{ openstack_auth.username }}','password':'{{ openstack_auth.password }}','project_name':'{{ openstack_auth.project_name }}'}"
####################
# Horizon
####################
horizon_openstack_keystone_default_role: "_member_"

View File

@ -1,4 +1,6 @@
---
- include: config.yml
- include: register.yml
- include: start.yml

View File

@ -0,0 +1,13 @@
---
- name: Creating the _member_ role
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m os_keystone_role
-a "name={{ horizon_openstack_keystone_default_role }}
auth={{ '{{ openstack_horizon_auth }}' }}"
-e "{'openstack_horizon_auth':{{ openstack_horizon_auth }}}"
register: horizon_role
changed_when: "{{ horizon_role.stdout.find('localhost | SUCCESS => ') != -1 and (horizon_role.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
until: horizon_role.stdout.split()[2] == 'SUCCESS'
retries: 10
delay: 5
run_once: True

View File

@ -160,7 +160,7 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
OPENSTACK_HOST = "{{ kolla_internal_fqdn }}"
OPENSTACK_KEYSTONE_URL = "{{ keystone_public_url }}"
OPENSTACK_KEYSTONE_DEFAULT_ROLE = "_member_"
OPENSTACK_KEYSTONE_DEFAULT_ROLE = "{{ horizon_openstack_keystone_default_role }}"
# Enables keystone web single-sign-on if set to True.
#WEBSSO_ENABLED = False