Avoid writing hosts if empty

This commit is contained in:
Joshua Boniface 2023-09-01 15:42:25 -04:00
parent f4e49b9d3e
commit d69770b776
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ ff02::2 ip6-allrouters
{{ node.upstream_ip }} {{ node.hostname.split('.')[0] }}.{{ local_domain }}
{% endfor %}
{% if hosts is defined %}
{% if hosts is defined and hosts %}
{% for host in hosts %}
{{ host.ip }} {{ host.name }}
{% endfor %}