
Default user group should be set much earlier in deployment and should be used consistently accross all projects. Change-Id: Id399f9ddebc903bb9c3eeb5a0ff6f33ca6d6828c Closes-Bug: #1650501
21 lines
1.1 KiB
YAML
21 lines
1.1 KiB
YAML
---
|
|
- name: Creating admin project, user, role, service, and endpoint
|
|
command: docker exec keystone kolla_keystone_bootstrap {{ openstack_auth.username }} {{ openstack_auth.password }} {{ openstack_auth.project_name }} admin {{ keystone_admin_url }} {{ keystone_internal_url }} {{ keystone_public_url }} {{ openstack_region_name }}
|
|
register: keystone_bootstrap
|
|
changed_when: "{{ (keystone_bootstrap.stdout | from_json).changed }}"
|
|
failed_when: "{{ (keystone_bootstrap.stdout | from_json).failed }}"
|
|
run_once: True
|
|
|
|
- name: Creating default user role
|
|
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
|
|
-m os_keystone_role
|
|
-a "name={{ keystone_default_user_role }}
|
|
auth={{ '{{ openstack_keystone_auth }}' }}"
|
|
-e "{'openstack_keystone_auth':{{ openstack_keystone_auth }}}"
|
|
register: default_role
|
|
changed_when: "{{ default_role.stdout.find('localhost | SUCCESS => ') != -1 and (default_role.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
|
|
until: default_role.stdout.split()[2] == 'SUCCESS'
|
|
retries: 10
|
|
delay: 5
|
|
run_once: True
|