Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Merge "Filter network_virtual_ips using service_net_map"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and openstack-gerrit committed Oct 13, 2021
2 parents 42c8b40 + 362a543 commit 32834d0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tripleo_ansible/roles/tripleo_hieradata/templates/vip_data.j2
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
{# Exclude networks in network_virtual_ips based on service_net_map #}
{# External virtual ip is currently being handled separately as public_virtual_ip. #}
{# Likewise, optional StorageNFS virtual ip is handled separately as ganesha_vip. #}
{% set _network_virtual_ips = {} %}
{% for key, value in network_virtual_ips.items() %}
{% if key not in [service_net_map['public_network'],
service_net_map['ganesha_network']] %}
{% set _ = _network_virtual_ips.update({key: value}) %}
{% endif %}
{% endfor %}
{% set vip_data = {} %}
{% set _ = vip_data.__setitem__('controller_virtual_ip', control_virtual_ip) %}
{% set _ = vip_data.__setitem__('keystone_admin_api_vip', (net_vip_map[service_net_map['keystone_admin_api_network']])) %}
{% set _ = vip_data.__setitem__('keystone_public_api_vip', (net_vip_map[service_net_map['keystone_public_api_network']])) %}
{% set _ = vip_data.__setitem__('public_virtual_ip', (net_vip_map[service_net_map['public_network']])) %}
{# the internal_api_virtual_ip is needed for contrail only #}
{% set _ = vip_data.__setitem__('internal_api_virtual_ip', (net_vip_map[service_net_map['internal_api_network']])) %}
{% set _ = vip_data.__setitem__('network_virtual_ips', network_virtual_ips) %}
{% set _ = vip_data.__setitem__('network_virtual_ips', _network_virtual_ips) %}
{% set _ = vip_data.__setitem__('ceph_dashboard_vip', (net_vip_map[service_net_map['ceph_dashboard_network']])) %}
{% set _ = vip_data.__setitem__('ganesha_vip', (net_vip_map[service_net_map['ganesha_network']])) %}
{# public_virtual_ip and controller_virtual_ip are needed in both HAproxy & keepalived. #}
Expand Down

0 comments on commit 32834d0

Please sign in to comment.