tripleo-ansible/tripleo_ansible/roles/tripleo_hieradata/templates/fqdn.j2
Kevin Carter 67ce344e30 Rename all roles that have a hyphen
All roles that have a hyphen in them need to be renamed to use an
underscore. This change creates a symlink to all roles using their
original name which will ensure we maintain compatibility with
the rest of the TripleO stack. This is being done because roles with
hyphens are no longer valid within collections.

A temp PBR update has been made to accomodate all of the symlinks to
the legacy role names.

[0] https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html#roles-directory

Change-Id: Id00a3670351990e5489a297c4c7200f8c05af096
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2020-01-21 20:42:40 -06:00

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 }}