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