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 }}"