---
- import_role:
    name: service-ks-register
  vars:
    service_ks_register_auth: "{{ openstack_octavia_auth }}"
    service_ks_register_services: "{{ octavia_ks_services }}"
    service_ks_register_users: "{{ octavia_ks_users }}"

- name: Adding octavia related roles
  become: true
  kolla_toolbox:
    container_engine: "{{ kolla_container_engine }}"
    module_name: openstack.cloud.identity_role
    module_args:
      name: "{{ item }}"
      auth: "{{ openstack_octavia_auth }}"
      endpoint_type: "{{ openstack_interface }}"
      cacert: "{{ openstack_cacert }}"
      region_name: "{{ openstack_region_name }}"
  run_once: True
  with_items: "{{ octavia_required_roles }}"
