diff --git a/tasks/providers/opendaylight_config.yml b/tasks/providers/opendaylight_config.yml index 73a515a7..90edba58 100644 --- a/tasks/providers/opendaylight_config.yml +++ b/tasks/providers/opendaylight_config.yml @@ -43,7 +43,7 @@ changed_when: False - name: Set ODL as OvS manager - command: ovs-vsctl set-manager tcp:{{ odl_ip }}:6640 + command: ovs-vsctl set-manager {{ ovs_manager_list }} when: ovs_manager.stdout == "" - name: Configure hosts for networking-odl, force kernel datapath diff --git a/vars/main.yml b/vars/main.yml index 4c7e67af..7b09a8f0 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -236,6 +236,13 @@ neutron_tunnel_types: "{{ neutron_ml2_drivers_type.split(',') | difference(_neut opendaylight_extra_features: ['odl-netvirt-openstack'] opendaylight_install_method: "{{ (ansible_os_family=='Debian') | ternary('deb_repo', 'rpm_repo') }}" +ovs_manager_list: |- + {% set ovs_managers_odls = [] %} + {% for host in groups["neutron_server_container"] %} + {% set odl_ip_address = hostvars[host]['container_address']|string %} + {% set _ = ovs_managers_odls.append('tcp:' + odl_ip_address + ':6640') %} + {% endfor %} + {{ ovs_managers_odls | join(' ') }} ### ### L3 Agent Plugin Configuration