---
- name: Creating the Murano service and endpoint
  kolla_toolbox:
    module_name: "kolla_keystone_service"
    module_args:
      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 }}"
      endpoint_type: "{{ openstack_interface }}"
  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
  kolla_toolbox:
    module_name: "kolla_keystone_user"
    module_args:
      project: "service"
      user: "{{ murano_keystone_user }}"
      password: "{{ murano_keystone_password }}"
      role: "admin"
      region_name: "{{ openstack_region_name }}"
      auth: "{{ openstack_murano_auth }}"
      endpoint_type: "{{ openstack_interface }}"
  run_once: True
