dnsmasq: fix template
It used to work. Now it doesn’t work. Fix it.
This commit is contained in:
parent
d89ed5a46b
commit
30e39ef68f
|
@ -8,7 +8,7 @@ dhcp-range = set:{{ prefix.vlan.name }},{{ range.start_address | ipaddr('address
|
|||
dhcp-option = tag:{{ prefix.vlan.name }},option:router,{{ prefix.custom_fields.gateway.address | ipaddr('address') }}
|
||||
{% endif -%}
|
||||
|
||||
{% for host in hostvars.values() | selectattr('primary_ip4') | selectattr('primary_ip4', 'ansible.utils.in_network', prefix.prefix) %}
|
||||
{% for host in hostvars.values() | selectattr('primary_ip4', 'defined') | selectattr('primary_ip4', 'ansible.utils.in_network', prefix.prefix) %}
|
||||
{% for interface in host.interfaces | selectattr('mac_address') %}
|
||||
{% for address in interface.ip_addresses | selectattr('status.value', '==', 'dhcp') %}
|
||||
dhcp-host = {{ interface.mac_address | lower }},{{ address.address | ipaddr('address') }},{{ interface.device.name | lower }}
|
||||
|
|
Loading…
Reference in a new issue