
Usernames can be configured with variables in configuration files, but user creation is hardcoded. Change-Id: I057cfb921d776217db66f59226dcfa79f3eb7368 Closes-Bug: #1661587
41 lines
1.8 KiB
YAML
41 lines
1.8 KiB
YAML
---
|
|
- name: Creating the Designate service and endpoint
|
|
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
|
|
-m kolla_keystone_service
|
|
-a "service_name=designate
|
|
service_type=dns
|
|
description='Designate DNS Service'
|
|
endpoint_region={{ openstack_region_name }}
|
|
url='{{ item.url }}'
|
|
interface='{{ item.interface }}'
|
|
region_name={{ openstack_region_name }}
|
|
auth={{ '{{ openstack_designate_auth }}' }}"
|
|
-e "{'openstack_designate_auth':{{ openstack_designate_auth }}}"
|
|
register: designate_endpoint
|
|
changed_when: "{{ designate_endpoint.stdout.find('localhost | SUCCESS => ') != -1 and (designate_endpoint.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
|
|
until: designate_endpoint.stdout.split()[2] == 'SUCCESS'
|
|
retries: 10
|
|
delay: 5
|
|
run_once: True
|
|
with_items:
|
|
- {'interface': 'admin', 'url': '{{ designate_admin_endpoint }}'}
|
|
- {'interface': 'internal', 'url': '{{ designate_internal_endpoint }}'}
|
|
- {'interface': 'public', 'url': '{{ designate_public_endpoint }}'}
|
|
|
|
- name: Creating the Designate project, user, and role
|
|
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
|
|
-m kolla_keystone_user
|
|
-a "project=service
|
|
user={{ designate_keystone_user }}
|
|
password={{ designate_keystone_password }}
|
|
role=admin
|
|
region_name={{ openstack_region_name }}
|
|
auth={{ '{{ openstack_designate_auth }}' }}"
|
|
-e "{'openstack_designate_auth':{{ openstack_designate_auth }}}"
|
|
register: designate_user
|
|
changed_when: "{{ designate_user.stdout.find('localhost | SUCCESS => ') != -1 and (designate_user.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
|
|
until: designate_user.stdout.split()[2] == 'SUCCESS'
|
|
retries: 10
|
|
delay: 5
|
|
run_once: True
|