kolla-ansible/ansible/roles/murano/tasks/register.yml
Paul Bourke d9fc4c6f40 Update murano service name
In Mitaka, the service name must have a dash rather than underscore when using
the sql catalog driver in Keystone[0] (the default).

This works for upgrade also, though further improvements could be written to
remove the old endpoint from Keystone, and automatically chose a dash or
underscore based on driver type used.

[0] http://docs.openstack.org/releasenotes/murano/mitaka.html#upgrade-notes

Change-Id: I15a03370afdad6529eec51a206b6134bf80b283d
Closes-Bug: 1576152
2016-04-28 12:35:16 +01:00

41 lines
1.7 KiB
YAML

---
- name: Creating the Murano service and endpoint
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m kolla_keystone_service
-a "service_name=murano
service_type=application-catalog
description='Openstack Application Catalogue'
endpoint_region={{ openstack_region_name }}
url='{{ item.url }}'
interface='{{ item.interface }}'
region_name={{ openstack_region_name }}
auth={{ '{{ openstack_murano_auth }}' }}"
-e "{'openstack_murano_auth':{{ openstack_murano_auth }}}"
register: murano_endpoint
changed_when: "{{ murano_endpoint.stdout.find('localhost | SUCCESS => ') != -1 and (murano_endpoint.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
until: murano_endpoint.stdout.split()[2] == 'SUCCESS'
retries: 10
delay: 5
run_once: True
with_items:
- {'interface': 'admin', 'url': '{{ murano_admin_endpoint }}'}
- {'interface': 'internal', 'url': '{{ murano_internal_endpoint }}'}
- {'interface': 'public', 'url': '{{ murano_public_endpoint }}'}
- name: Creating the Murano project, user, and role
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m kolla_keystone_user
-a "project=service
user=murano
password={{ murano_keystone_password }}
role=admin
region_name={{ openstack_region_name }}
auth={{ '{{ openstack_murano_auth }}' }}"
-e "{'openstack_murano_auth':{{ openstack_murano_auth }}}"
register: murano_user
changed_when: "{{ murano_user.stdout.find('localhost | SUCCESS => ') != -1 and (murano_user.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
until: murano_user.stdout.split()[2] == 'SUCCESS'
retries: 10
delay: 5
run_once: True