servers/templates/10-network.rules.j2
2024-08-28 12:43:14 +02:00

4 lines
205 B
Django/Jinja

{% for iface in hostvars[inventory_hostname].interfaces | selectattr('mac_address') %}
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="{{ iface.mac_address|lower }}", NAME="{{ iface.name }}"
{% endfor %}