|
@@ -12,7 +12,7 @@
|
|
|
# Stretch, Buster, ...
|
|
|
{% else %}
|
|
|
|
|
|
-# Systemd link files?
|
|
|
+# Write an systemd link file for every interface with a MAC
|
|
|
{% for iface, iface_config in salt['pillar.get']('nodes:' ~ grains['id'] ~ ':ifaces', {}).items ()|sort %}
|
|
|
{% if 'mac' in iface_config %}
|
|
|
/etc/systemd/network/42-{{ iface }}.link:
|
|
@@ -22,6 +22,14 @@
|
|
|
interface: {{ iface }}
|
|
|
iface_config: {{ iface_config }}
|
|
|
desc: {{ iface_config.get ('desc', '') }}
|
|
|
+ - watch_in:
|
|
|
+ - cmd: update-initramfs
|
|
|
{% endif %}
|
|
|
{% endfor %}
|
|
|
{% endif %}
|
|
|
+
|
|
|
+
|
|
|
+# Rebuild initrd files if neccessary
|
|
|
+update-initramfs:
|
|
|
+ cmd.wait:
|
|
|
+ - name: /usr/sbin/update-initramfs -k all -u
|