tripleo-common/roles/tripleo-hieradata/templates/vip_data.j2
Martin Schuppert b2046fd6c0 Move redis_vip to all_nodes.j2
In case of cell stacks we need to pass redis_vip as an input
to be able to use redis on the central controllers. This
moves the redis_vip setting to all_nodes and only set it if
it is not an additional cell.

Depends-On: https://review.opendev.org/672940

Change-Id: I7ca94dff4acf0816708110b9fe6f78d19dcc7b4d
2019-07-26 15:43:07 +02:00

53 lines
2.2 KiB
Django/Jinja

{
"controller_virtual_ip": "{{ control_virtual_ip }}",
"keystone_admin_api_vip": "{{ net_vip_map[service_net_map['keystone_admin_api_network']] }}",
"keystone_public_api_vip": "{{ net_vip_map[service_net_map['keystone_public_api_network']] }}",
{%- if 'External' in enabled_networks %}
"public_virtual_ip": "{{ net_vip_map[networks['External']['name_lower']] }}",
{%- else %}
"public_virtual_ip": "{{ net_vip_map.ctlplane }}",
{%- endif %}
{%- if 'InternalApi' in enabled_networks %}
{# the internal_api_virtual_ip is needed for contrail only #}
"internal_api_virtual_ip": "{{ net_vip_map[networks['InternalApi']['name_lower']] }}",
{%- endif %}
"network_virtual_ips": {{ network_virtual_ips | to_json }},
{%- for network in enabled_networks if network == 'StorageNFS' %}
"ganesha_vip": "{{ net_vip_map[storagenfs_net_name] }}"
{%- endfor %}
{# public_virtual_ip and controller_virtual_ip are needed in both HAproxy & keepalived. #}
{%- if 'External' in enabled_networks %}
"tripleo::haproxy::public_virtual_ip": "{{ net_vip_map[networks['External']['name_lower']] }}",
"tripleo::keepalived::public_virtual_ip": "{{ net_vip_map[networks['External']['name_lower']] }}",
{%- else %}
"tripleo::haproxy::public_virtual_ip": "{{ net_vip_map.ctlplane }}",
"tripleo::keepalived::public_virtual_ip": "{{ net_vip_map.ctlplane }}",
{%- endif %}
"tripleo::haproxy::controller_virtual_ip": "{{ net_vip_map.ctlplane }}",
"tripleo::keepalived::controller_virtual_ip": "{{ net_vip_map.ctlplane }}",
"tripleo::keepalived::redis_virtual_ip": "{{ net_vip_map.redis }}",
"tripleo::redis_notification::haproxy_monitor_ip": "{{ net_vip_map.ctlplane }}",
{%- for key, value in cloud_names.items() %}
"{{key}}": "{{value}}",
{%- endfor %}
"enable_internal_tls": {{ enable_internal_tls | lower }}
{%- for service in enabled_services %}
{%- if service_net_map.get(service ~ '_network', 'noop') in net_vip_map %}
{# we set explicit vips for these services, no need to calculate them dynamically #}
{%- if service not in ['redis', 'ganesha', 'keystone_admin_api_vip', 'keystone_public_api_vip'] %}
,"{{service}}_vip": "{{ net_vip_map[service_net_map[service ~ '_network']] }}"
{%- endif %}
{%- endif %}
{%- endfor %}
}