udev-rules.tmpl 555 B

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