13 lines
626 B
Django/Jinja
13 lines
626 B
Django/Jinja
{% set fqdn = {} %}
|
|
{% set _ = fqdn.__setitem__('fqdn_ctlplane', (inventory_hostname ~ '.ctlplane.' ~ cloud_domain)) %}
|
|
{% set _ = fqdn.__setitem__('fqdn_canonical', (inventory_hostname ~ '.' ~ cloud_domain)) %}
|
|
{% if enabled_networks is defined and enabled_networks %}
|
|
{% for network in enabled_networks %}
|
|
{% if role_networks is defined and role_networks and network in role_networks %}
|
|
{% set _ = fqdn.__setitem__(('fqdn_' ~ networks[network]['name_lower']), (inventory_hostname ~ '.' ~ network | lower ~ '.' ~ cloud_domain)) %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{# RENDER #}
|
|
{{ fqdn | to_nice_json }}
|