udev-rules.tmpl 505 B

1234567891011
  1. #
  2. # FFHO net rules (Salt managed)
  3. #
  4. {%- for iface, iface_config in salt['pillar.get']('nodes:' ~ grains['id'] ~ ':ifaces', {}).items ()|sort %}
  5. {%- if '_udev_mac' in iface_config or 'mac' in iface_config %}
  6. {%- set mac = iface_config.get ('mac', iface_config.get ('_udev_mac')) -%}
  7. # {{ iface_config.get ('desc', '') }}
  8. SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="{{ mac }}", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="{{ iface }}"
  9. {%- endif %}
  10. {%- endfor %}