bundles/systemd-networkd: add dummy interfaces

This commit is contained in:
Franzi 2021-09-29 19:44:37 +02:00
parent 996ef6e115
commit fe44417b14
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 18 additions and 0 deletions

View file

@ -0,0 +1,3 @@
[NetDev]
Name=${name}
Kind=dummy

View file

@ -63,6 +63,21 @@ for interface, config in node.metadata['interfaces'].items():
},
}
weight = 61
elif interface.startswith('dummy'):
files[f'/etc/systemd/network/60-iface-{interface}.netdev'] = {
'source': 'template-dummy.netdev',
'content_type': 'mako',
'context': {
'name': interface,
},
'needed_by': {
'svc_systemd:systemd-networkd',
},
'triggers': {
'svc_systemd:systemd-networkd:restart',
},
}
weight = 61
else:
weight = 50