2026-08-28 11:04:35 +00:00
|
|
|
#jinja2: trim_blocks: True, lstrip_blocks: True
|
2026-09-07 19:50:34 +00:00
|
|
|
{% for item in dnsmasq_managed_group | sort %}
|
2026-09-20 22:14:56 +00:00
|
|
|
{% set client = hostvars[item] %}
|
|
|
|
|
{% set ip = client.container_ip | default(client.ansible_host | default(none)) %}
|
|
|
|
|
{% if client['dhcp-host'] is defined and client['dhcp-host'] and ip %}
|
|
|
|
|
{% set entries = client['dhcp-host'] if (client['dhcp-host'] is iterable and client['dhcp-host'] is not string) else [client['dhcp-host']] %}
|
|
|
|
|
{% for entry in entries %}
|
|
|
|
|
{% if entry.mac %}
|
2026-08-28 11:04:35 +00:00
|
|
|
dhcp-host={{ entry.mac }},{{ ip }},{{ item }}
|
2026-09-20 22:14:56 +00:00
|
|
|
{% endif %}
|
|
|
|
|
{% endfor %}
|
|
|
|
|
{% endif %}
|
2026-08-28 11:04:35 +00:00
|
|
|
{% endfor %}
|