From abbfc7f2aa119caff021944a78bd7b6fd6c97152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harald=20Jens=C3=A5s?= Date: Fri, 8 Oct 2021 13:52:53 +0200 Subject: [PATCH] Use service_net_map for internal_api_vip Use the internal_api_network entry in service_net_map for internal_api_virtual_ip instead of conditions on hard-coded network name 'InternalApi'. Also clean up indentation for public_virtual_ip. Related-Bug: #1946239 Depends-On: I1dcd9da59487bfa0842c5f131a0e9a9d9d0c676d Change-Id: Iaba927739f82253809b1f0a1c96b9ac98a005ed6 --- .../tripleo_hieradata/molecule/hieradata_vars/molecule.yml | 1 + .../roles/tripleo_hieradata/templates/vip_data.j2 | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tripleo_ansible/roles/tripleo_hieradata/molecule/hieradata_vars/molecule.yml b/tripleo_ansible/roles/tripleo_hieradata/molecule/hieradata_vars/molecule.yml index b815ebf35..4fd9e1d23 100644 --- a/tripleo_ansible/roles/tripleo_hieradata/molecule/hieradata_vars/molecule.yml +++ b/tripleo_ansible/roles/tripleo_hieradata/molecule/hieradata_vars/molecule.yml @@ -210,6 +210,7 @@ provisioner: heat_api_cloudwatch_network: ctlplane heat_api_network: ctlplane horizon_network: ctlplane + internal_api_network: ctlplane ironic_api_network: ctlplane ironic_inspector_network: ctlplane ironic_network: ctlplane diff --git a/tripleo_ansible/roles/tripleo_hieradata/templates/vip_data.j2 b/tripleo_ansible/roles/tripleo_hieradata/templates/vip_data.j2 index 64694fd4c..7c11dca20 100644 --- a/tripleo_ansible/roles/tripleo_hieradata/templates/vip_data.j2 +++ b/tripleo_ansible/roles/tripleo_hieradata/templates/vip_data.j2 @@ -2,11 +2,9 @@ {% 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']])) %} -{% if 'InternalApi' in enabled_networks %} +{% 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[networks['InternalApi']['name_lower']])) %} -{% endif %} +{% 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__('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']])) %}