[FIX] Gérer l'absence d'ipv4 ou ipv6
This commit is contained in:
parent
712b394e8d
commit
8b53aed46a
@ -1,8 +1,9 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
{% for ip in dnsmasq_host_ipv4 %}
|
||||
{{ ip }} {{ dnsmasq_client_hostname }} {{ dnsmasq_host_aliases | join(' ') }}
|
||||
{% endfor %}
|
||||
{% for ip in dnsmasq_host_ipv6 %}
|
||||
{% set ips = dnsmasq_host_ipv4 + dnsmasq_host_ipv6 %}
|
||||
|
||||
{% for ip in ips %}
|
||||
{% if ip | length > 0 %}
|
||||
{{ ip }} {{ dnsmasq_client_hostname }} {{ dnsmasq_host_aliases | join(' ') }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
Loading…
Reference in New Issue
Block a user