
Change-Id: I75b58248bfc4e86cace75faa82526d55a9ebbdbf Partially-Implements: blueprint sahara-role
41 lines
1.7 KiB
YAML
41 lines
1.7 KiB
YAML
---
|
|
- name: Creating the Sahara service and endpoint
|
|
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
|
|
-m kolla_keystone_service
|
|
-a "service_name=sahara
|
|
service_type=data_processing
|
|
description='Sahara Data Processing'
|
|
endpoint_region={{ openstack_region_name }}
|
|
url='{{ item.url }}'
|
|
interface='{{ item.interface }}'
|
|
region_name={{ openstack_region_name }}
|
|
auth={{ '{{ openstack_sahara_auth }}' }}"
|
|
-e "{'openstack_sahara_auth':{{ openstack_sahara_auth }}}"
|
|
register: sahara_endpoint
|
|
changed_when: "{{ sahara_endpoint.stdout.find('localhost | SUCCESS => ') != -1 and (sahara_endpoint.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
|
|
until: sahara_endpoint.stdout.split()[2] == 'SUCCESS'
|
|
retries: 10
|
|
delay: 5
|
|
run_once: True
|
|
with_items:
|
|
- {'interface': 'admin', 'url': '{{ sahara_admin_endpoint }}'}
|
|
- {'interface': 'internal', 'url': '{{ sahara_internal_endpoint }}'}
|
|
- {'interface': 'public', 'url': '{{ sahara_public_endpoint }}'}
|
|
|
|
- name: Creating the Sahara project, user, and role
|
|
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
|
|
-m kolla_keystone_user
|
|
-a "project=service
|
|
user=sahara
|
|
password={{ sahara_keystone_password }}
|
|
role=admin
|
|
region_name={{ openstack_region_name }}
|
|
auth={{ '{{ openstack_sahara_auth }}' }}"
|
|
-e "{'openstack_sahara_auth':{{ openstack_sahara_auth }}}"
|
|
register: sahara_user
|
|
changed_when: "{{ sahara_user.stdout.find('localhost | SUCCESS => ') != -1 and (sahara_user.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
|
|
until: sahara_user.stdout.split()[2] == 'SUCCESS'
|
|
retries: 10
|
|
delay: 5
|
|
run_once: True
|