link.sls 739 B

1234567891011121314151617181920212223242526
  1. #
  2. # Networking / link
  3. #
  4. {% if grains['oscodename'] == 'jessie' %}
  5. # Udev rules
  6. /etc/udev/rules.d/42-ffho-net.rules:
  7. file.managed:
  8. - template: jinja
  9. - source: salt://network/udev-rules.tmpl
  10. {% endif %}
  11. # Systemd link files?
  12. {% if grains['oscodename'] == 'stretch' %}
  13. {% for iface, iface_config in salt['pillar.get']('nodes:' ~ grains['id'] ~ ':ifaces', {}).items ()|sort %}
  14. {% if '_udev_mac' in iface_config or 'mac' in iface_config %}
  15. /etc/systemd/network/42-{{ iface }}.link:
  16. file.managed:
  17. - source: salt://network/systemd-link.tmpl
  18. - template: jinja
  19. interface: {{ iface }}
  20. iface_config: {{ iface_config }}
  21. desc: {{ iface_config.get ('desc', '') }}
  22. {% endif %}
  23. {% endfor %}
  24. {% endif %}