homeserver-iac/roles/networking/hosts/templates/hosts.j2

14 lines
344 B
Plaintext
Raw Normal View History

2023-08-23 17:54:55 -04:00
# Static table lookup for hostnames.
# See hosts(5) for details.
# This file (/etc/hosts) is automatically generated via Ansible.
# Modifications will be lost!
{% for host in groups["all"] %}
{% if wireguard_services %}
{{ hostvars[host]["vpn_ip"] }} {{ host }}
{% else %}
2023-08-26 22:02:29 -04:00
{{ hostvars[host]["local_ip"] }} {{ host }}
{% endif %}
2023-08-23 17:54:55 -04:00
{% endfor %}