Avoid writing hosts if empty
This commit is contained in:
parent
8fa8590eb8
commit
6b79e5db31
|
@ -12,7 +12,7 @@ ff02::2 ip6-allrouters
|
||||||
{{ node.upstream_ip }} {{ node.hostname.split('.')[0] }}.{{ local_domain }}
|
{{ node.upstream_ip }} {{ node.hostname.split('.')[0] }}.{{ local_domain }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% if hosts is defined %}
|
{% if hosts is defined and hosts %}
|
||||||
{% for host in hosts %}
|
{% for host in hosts %}
|
||||||
{{ host.ip }} {{ host.name }}
|
{{ host.ip }} {{ host.name }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Reference in New Issue