diff options
Diffstat (limited to 'roles/space_server/templates/avahi-hosts.j2')
-rw-r--r-- | roles/space_server/templates/avahi-hosts.j2 | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/roles/space_server/templates/avahi-hosts.j2 b/roles/space_server/templates/avahi-hosts.j2 index 1e371e6..e64265a 100644 --- a/roles/space_server/templates/avahi-hosts.j2 +++ b/roles/space_server/templates/avahi-hosts.j2 @@ -1,16 +1,16 @@ -{% for host in local_hosts %} -{% if 'mdns' not in host or host.mdns %} -{% if 'ipv4' in host %} -{% for ip in host.ipv4 %} +{% for name, info in local_hosts.items() %} +{% if 'mdns' not in info or info.mdns %} +{% if 'ipv4' in info %} +{% for ip in info.ipv4 %} {% if loop.index <= 1 %} -{{ ip }} {{ host.name }}.local +{{ ip }} {{ name }}.local {% endif %} {% endfor %} {% endif %} -{% if 'ipv6' in host %} -{% for ip in host.ipv6 %} +{% if 'ipv6' in info %} +{% for ip in info.ipv6 %} {% if loop.index <= 1 %} -{{ ip }} {{ host.name }}.local +{{ ip }} {{ name }}.local {% endif %} {% endfor %} {% endif %} |