role_dnsmasq/templates/hosts.conf.j2

7 lines
251 B
Plaintext
Raw Normal View History

2023-09-22 15:25:03 +00:00
# {{ ansible_managed }}
{% for ip in dnsmasq_host_ips %}
{% set hostnames = [hostvars[host]['inventory_hostname']] + [hostvars[host]['inventory_hostname_short']] + dnsmasq_host_aliases %}
{{ ip }} {{ hostnames | select() | join(' ') }}
{% endfor %}