Jeffrey Zhang 377ece5774 Adding octavia required roles
Adding following role which is reuqired by octavia services

- load-balancer_observer
- load-balancer_global_observer
- load-balancer_member
- load-balancer_admin
- load-balancer_quota_admin

Change-Id: I6f351c96915b09cb9a6ef716515b45785d62cb90
Closes-Bug: #1745915
2018-01-29 12:49:35 +08:00

62 lines
2.1 KiB
YAML

---
- name: Creating the Octavia service and endpoint
kolla_toolbox:
module_name: "kolla_keystone_service"
module_args:
service_name: "octavia"
service_type: "load-balancer"
description: "Octavia Load Balancing Service"
endpoint_region: "{{ openstack_region_name }}"
url: "{{ item.url }}"
interface: "{{ item.interface }}"
region_name: "{{ openstack_region_name }}"
auth: "{{ '{{ openstack_octavia_auth }}' }}"
endpoint_type: "{{ openstack_interface }}"
module_extra_vars:
openstack_octavia_auth: "{{ openstack_octavia_auth }}"
run_once: True
with_items:
- {'interface': 'admin', 'url': '{{ octavia_admin_endpoint }}'}
- {'interface': 'internal', 'url': '{{ octavia_internal_endpoint }}'}
- {'interface': 'public', 'url': '{{ octavia_public_endpoint }}'}
- name: Creating the Octavia project, user, and role
kolla_toolbox:
module_name: "kolla_keystone_user"
module_args:
project: "service"
user: "{{ octavia_keystone_user }}"
password: "{{ octavia_keystone_password }}"
role: "admin"
region_name: "{{ openstack_region_name }}"
auth: "{{ '{{ openstack_octavia_auth }}' }}"
endpoint_type: "{{ openstack_interface }}"
module_extra_vars:
openstack_octavia_auth: "{{ openstack_octavia_auth }}"
run_once: True
- name: Adding octavia user into admin project
kolla_toolbox:
module_name: "os_user_role"
module_args:
user: "{{ octavia_keystone_user }}"
role: admin
project: admin
auth: "{{ '{{ openstack_octavia_auth }}' }}"
endpoint_type: "{{ openstack_interface }}"
module_extra_vars:
openstack_octavia_auth: "{{ openstack_octavia_auth }}"
run_once: True
- name: Adding octavia related roles
kolla_toolbox:
module_name: "os_keystone_role"
module_args:
name: "{{ item }}"
auth: "{{ '{{ openstack_octavia_auth }}' }}"
endpoint_type: "{{ openstack_interface }}"
module_extra_vars:
openstack_octavia_auth: "{{ openstack_octavia_auth }}"
run_once: True
with_items: "{{ octavia_required_roles }}"