From 16d859f0a3add918ddc307cf1692585b92791416 Mon Sep 17 00:00:00 2001 From: pperiyasamy Date: Wed, 23 Aug 2017 15:09:17 +0530 Subject: [PATCH] adding multiple ovs manager providing facility to add multiple ovs managers Change-Id: Ie1645371cda33eef58c3a018a5e8e7d0df885c40 Signed-off-by: pperiyasamy Signed-off-by: pperiyasamy Signed-off-by: pperiyasamy --- tasks/providers/opendaylight_config.yml | 2 +- vars/main.yml | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) 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 6778a85c..183ddf29 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