pvc-ansible/roles/base/templates/etc/hosts.j2

20 lines
529 B
Django/Jinja

# Local system hosts file
# {{ ansible_managed }}
127.0.0.1 localhost
::1 ip6-localhost ip6-loopback
ff02::1 ip6-allmodes
ff02::2 ip6-allrouters
{% for node in pvc_nodes %}
{{ node.cluster_ip }} {{ node.hostname }}.{{ pvc_cluster_domain }} {{ node.hostname }}
{{ node.storage_ip }} {{ node.hostname }}.{{ pvc_storage_domain }}
{{ node.upstream_ip }} {{ node.hostname }}.{{ local_domain }}
{% endfor %}
{% if hosts is defined and hosts %}
{% for host in hosts %}
{{ host.ip }} {{ host.name }}
{% endfor %}
{% endif %}