Prefer ovn_dbs_vip from all_nodes_extra_map_data

When all_nodes_extra_map_data includes a value for ovn_dbs_vip that
value should be preferred over any other. This fixes an issue in the
multi-stack case where the dependent stacks were using the wrong value
for the ovn vip.

Change-Id: Idf534e50d3a1ec879c340996ac225c80f4b52d3f
(cherry picked from commit a610cb132a)
This commit is contained in:
James Slagle 2019-11-11 11:26:07 -05:00
parent 73ce885352
commit 0c76b58e7f
1 changed files with 7 additions and 3 deletions

View File

@ -36,11 +36,15 @@
{% for key, value in service_net_map.items() %}
{% set _ = all_nodes.__setitem__(key, value) %}
{% endfor %}
{% if 'redis' in enabled_services %}
{% if 'redis' in all_enabled_services %}
{% set _ = all_nodes.__setitem__('redis_vip', (net_vip_map.redis)) %}
{% endif %}
{% if 'ovn_dbs' in enabled_services and net_vip_map.ovn_dbs is defined %}
{% set _ = all_nodes.__setitem__('ovn_dbs_vip', (net_vip_map.ovn_dbs)) %}
{% if 'ovn_dbs' in all_enabled_services %}
{% if 'ovn_dbs_vip' in all_nodes_extra_map_data %}
{% set _ = all_nodes.__setitem__('ovn_dbs_vip', all_nodes_extra_map_data['ovn_dbs_vip']) %}
{% elif net_vip_map.ovn_dbs is defined %}
{% set _ = all_nodes.__setitem__('ovn_dbs_vip', (net_vip_map.ovn_dbs)) %}
{% endif %}
{% endif %}
{% if hieradata_localhost_address is undefined %}
{% set hieradata_localhost_address = ('ipv6' in (ansible_lo | default({}))) | ternary('localhost', '127.0.0.1') %}