Fix OVS manager configuration inconsistencies which are related to ODL

1. The 'neutron_services['neutron-server']['group']' returns
   a string which is not iterable thus we replaced this with
   'groups[neutron_services['neutron-server']['group']]' to make
   the for loop functional again.

2. We replaced the 'container_address' key with the 'ansible_host'
   key to resolve the key missing problem which occured at the ODL gate
   due to the fact that we do not have a container_address variable to the
   tests/host_vars/server1.yml file.

Change-Id: I4384ee1e6cd6c7f423ef4b2b5eedc1a05b3d9862
Signed-off-by: Dimitrios Markou <mardim@intracom-telecom.com>
This commit is contained in:
Dimitrios Markou 2017-11-16 12:32:49 +02:00
parent bb77c33a0f
commit cd02a03c60

View File

@ -241,12 +241,10 @@ opendaylight_install_method: "{{ (ansible_os_family=='Debian') | ternary('deb_re
ovs_manager_list: |-
{% set ovs_managers_odls = [] %}
{% for host in neutron_services['neutron-server']['group'] %}
{% set odl_ip_address = hostvars[host]['container_address']|string %}
{% set _ = ovs_managers_odls.append('tcp:' + odl_ip_address + ':6640') %}
{% endfor %}
{% for odl_ip_address in groups[neutron_services['neutron-server']['group']] | map('extract', hostvars, 'ansible_host') | list -%}
{% set _ = ovs_managers_odls.append('tcp:' ~ odl_ip_address ~ ':6640') %}
{%- endfor %}
{{ ovs_managers_odls | join(' ') }}
###
### L3 Agent Plugin Configuration
###