Add udev rules for renaming all interfaces with defined MAC address
Gonna include BMC and such but shouldn’t hurt. Allows us to use different interface names where sensible.
This commit is contained in:
parent
fbfdc83ee5
commit
7b4cb8f579
|
@ -1,3 +1,3 @@
|
|||
{% for iface in hostvars[inventory_hostname].interfaces | selectattr('name', 'match', '^(lan|mgmt)') %}
|
||||
{% for iface in hostvars[inventory_hostname].interfaces | selectattr('mac_address') %}
|
||||
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="{{ iface.mac_address|lower }}", NAME="{{ iface.name }}"
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in a new issue