Move localhost_address to net_ip_map hieradata
all_nodes is meant to be for hieradata that is the same across all nodes, while localhost_address could possibly be node specific. This change moves it from all_nodes to net_ip_map. This will allow rendering the all_nodes template once and then just copying it into place, which will be a significant performance improvement. Change-Id: Ie3b5f242bc2afce9d395e29db498b3516f8bcc3c
This commit is contained in:
parent
e880fa6e11
commit
5c06ffdcd5
|
@ -55,10 +55,6 @@
|
||||||
{% set _ = all_nodes.__setitem__('ovn_dbs_vip', (net_vip_map.ovn_dbs)) %}
|
{% set _ = all_nodes.__setitem__('ovn_dbs_vip', (net_vip_map.ovn_dbs)) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if hieradata_localhost_address is undefined %}
|
|
||||||
{% set hieradata_localhost_address = ('ipv6' in (ansible_lo | default({}))) | ternary('localhost', '127.0.0.1') %}
|
|
||||||
{% endif %}
|
|
||||||
{% set _ = all_nodes.__setitem__('localhost_address', hieradata_localhost_address) %}
|
|
||||||
{% set _ = all_nodes.__setitem__('deploy_identifier', deploy_identifier) %}
|
{% set _ = all_nodes.__setitem__('deploy_identifier', deploy_identifier) %}
|
||||||
{% set _ = all_nodes.__setitem__('stack_action', stack_action) %}
|
{% set _ = all_nodes.__setitem__('stack_action', stack_action) %}
|
||||||
{% set _ = all_nodes.__setitem__('stack_update_type', stack_update_type) %}
|
{% set _ = all_nodes.__setitem__('stack_update_type', stack_update_type) %}
|
||||||
|
|
|
@ -20,5 +20,9 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if hieradata_localhost_address is undefined %}
|
||||||
|
{% set hieradata_localhost_address = ('ipv6' in (ansible_lo | default({}))) | ternary('localhost', '127.0.0.1') %}
|
||||||
|
{% endif %}
|
||||||
|
{% set _ = net_ip_map.__setitem__('localhost_address', hieradata_localhost_address) %}
|
||||||
{# RENDER #}
|
{# RENDER #}
|
||||||
{{ net_ip_map | to_nice_json }}
|
{{ net_ip_map | to_nice_json }}
|
||||||
|
|
Loading…
Reference in New Issue