Avoid writing hosts if empty

This commit is contained in:
Joshua Boniface 2021-06-05 01:11:02 -04:00
parent 8fa8590eb8
commit 6b79e5db31
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 %}