role_dnsmasq/templates/ansible_hosts.conf.j2

14 lines
529 B
Plaintext
Raw Normal View History

# {{ ansible_managed }}
{% for host in groups['all'] %}
# BEGIN {{ host }}
{% if hostvars[host]["dnsmasq_host_ipv4"] | length > 0 %}
hostvars[host]["dnsmasq_host_ipv4"] {{ hostvars[host]["dnsmasq_client_hostname"] }} {{ hostvars[host]["dnsmasq_host_aliases"] | join(' ') }}
{% endif %}
{% if hostvars[host]["dnsmasq_host_ipv4"] | length > 0 %}
hostvars[host]["dnsmasq_host_ipv4"] {{ hostvars[host]["dnsmasq_client_hostname"] }} {{ hostvars[host]["dnsmasq_host_aliases"] | join(' ') }}
{% endif %}
# END {{ host }}
{% endfor %}