kolla-ansible/ansible/roles/heat/tasks/register.yml

92 lines
3.4 KiB
YAML

---
- name: Creating the Heat service and endpoint
kolla_toolbox:
module_name: "kolla_keystone_service"
module_args:
service_name: "{{ item.service_name }}"
service_type: "{{ item.service_type }}"
description: "Openstack Orchestration"
endpoint_region: "{{ openstack_region_name }}"
url: "{{ item.url }}"
interface: "{{ item.interface }}"
region_name: "{{ openstack_region_name }}"
auth: "{{ '{{ openstack_heat_auth }}' }}"
endpoint_type: "{{ openstack_interface }}"
module_extra_vars:
openstack_heat_auth: "{{ openstack_heat_auth }}"
register: heat_endpoint
until: heat_endpoint|success
retries: 10
delay: 5
run_once: True
with_items:
- {'interface': 'admin', 'url': '{{ heat_admin_endpoint }}', 'service_name': 'heat', 'service_type': 'orchestration'}
- {'interface': 'internal', 'url': '{{ heat_internal_endpoint }}', 'service_name': 'heat', 'service_type': 'orchestration'}
- {'interface': 'public', 'url': '{{ heat_public_endpoint }}', 'service_name': 'heat', 'service_type': 'orchestration'}
- {'interface': 'admin', 'url': '{{ heat_cfn_admin_endpoint }}', 'service_name': 'heat-cfn', 'service_type': 'cloudformation'}
- {'interface': 'internal', 'url': '{{ heat_cfn_internal_endpoint }}', 'service_name': 'heat-cfn', 'service_type': 'cloudformation'}
- {'interface': 'public', 'url': '{{ heat_cfn_public_endpoint }}', 'service_name': 'heat-cfn', 'service_type': 'cloudformation'}
- name: Creating the Heat project, user, and role
kolla_toolbox:
module_name: "kolla_keystone_user"
module_args:
project: "service"
user: "{{ heat_keystone_user }}"
password: "{{ heat_keystone_password }}"
role: "admin"
region_name: "{{ openstack_region_name }}"
auth: "{{ '{{ openstack_heat_auth }}' }}"
endpoint_type: "{{ openstack_interface }}"
module_extra_vars:
openstack_heat_auth: "{{ openstack_heat_auth }}"
register: heat_user
until: heat_user|success
retries: 10
delay: 5
run_once: True
- name: Creating the heat_stack_user role
kolla_toolbox:
module_name: os_keystone_role
module_args:
name: "{{ heat_stack_user_role }}"
auth: "{{ '{{ openstack_heat_auth }}' }}"
endpoint_type: "{{ openstack_interface }}"
module_extra_vars:
openstack_heat_auth: "{{ openstack_heat_auth }}"
register: heat_stack_user_role_result
until: heat_stack_user_role_result|success
retries: 10
delay: 5
run_once: True
- name: Creating the heat_stack_owner role
kolla_toolbox:
module_name: os_keystone_role
module_args:
name: "{{ heat_stack_owner_role }}"
auth: "{{ '{{ openstack_heat_auth }}' }}"
endpoint_type: "{{ openstack_interface }}"
module_extra_vars:
openstack_heat_auth: "{{ openstack_heat_auth }}"
register: heat_stack_owner_role_result
until: heat_stack_owner_role_result|success
retries: 10
delay: 5
run_once: True
- name: Add the heat_stack_owner role to the admin project
kolla_toolbox:
module_name: "os_user_role"
module_args:
project: "{{ openstack_auth.project_name }}"
user: "{{ openstack_auth.username }}"
role: "{{ heat_stack_owner_role }}"
region_name: "{{ openstack_region_name }}"
auth: "{{ '{{ openstack_heat_auth }}' }}"
endpoint_type: "{{ openstack_interface }}"
module_extra_vars:
openstack_heat_auth: "{{ openstack_heat_auth }}"
run_once: True