From 377ece5774c1589566b4b1c5e6538e3e1448cbeb Mon Sep 17 00:00:00 2001 From: Jeffrey Zhang Date: Mon, 29 Jan 2018 12:47:59 +0800 Subject: [PATCH] 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 --- ansible/roles/octavia/defaults/main.yml | 7 +++++++ ansible/roles/octavia/tasks/register.yml | 12 ++++++++++++ 2 files changed, 19 insertions(+) diff --git a/ansible/roles/octavia/defaults/main.yml b/ansible/roles/octavia/defaults/main.yml index 8ddf478411..e3fc7db4ec 100644 --- a/ansible/roles/octavia/defaults/main.yml +++ b/ansible/roles/octavia/defaults/main.yml @@ -39,6 +39,13 @@ octavia_services: - "/etc/localtime:/etc/localtime:ro" - "kolla_logs:/var/log/kolla/" +octavia_required_roles: + - load-balancer_observer + - load-balancer_global_observer + - load-balancer_member + - load-balancer_admin + - load-balancer_quota_admin + #################### # Database diff --git a/ansible/roles/octavia/tasks/register.yml b/ansible/roles/octavia/tasks/register.yml index ef7520328d..e124d7bfbc 100644 --- a/ansible/roles/octavia/tasks/register.yml +++ b/ansible/roles/octavia/tasks/register.yml @@ -47,3 +47,15 @@ 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 }}"