bundles/systemd-networkd: add option to only create a .netdev file for interfaces
This commit is contained in:
parent
be2cdc39e8
commit
b1860b7e01
1 changed files with 15 additions and 14 deletions
|
@ -49,20 +49,21 @@ for interface, config in node.metadata['interfaces'].items():
|
||||||
else:
|
else:
|
||||||
weight = 50
|
weight = 50
|
||||||
|
|
||||||
files['/etc/systemd/network/{}-iface-{}.network'.format(weight, interface)] = {
|
if not config.get('ignore', False):
|
||||||
'source': template,
|
files['/etc/systemd/network/{}-iface-{}.network'.format(weight, interface)] = {
|
||||||
'content_type': 'mako',
|
'source': template,
|
||||||
'context': {
|
'content_type': 'mako',
|
||||||
'interface': interface,
|
'context': {
|
||||||
'config': config,
|
'interface': interface,
|
||||||
},
|
'config': config,
|
||||||
'needed_by': {
|
},
|
||||||
'svc_systemd:systemd-networkd',
|
'needed_by': {
|
||||||
},
|
'svc_systemd:systemd-networkd',
|
||||||
'triggers': {
|
},
|
||||||
'svc_systemd:systemd-networkd:restart',
|
'triggers': {
|
||||||
},
|
'svc_systemd:systemd-networkd:restart',
|
||||||
}
|
},
|
||||||
|
}
|
||||||
|
|
||||||
for bond, config in node.metadata.get('systemd-networkd', {}).get('bonds', {}).items():
|
for bond, config in node.metadata.get('systemd-networkd', {}).get('bonds', {}).items():
|
||||||
files['/etc/systemd/network/20-bond-{}.netdev'.format(bond)] = {
|
files['/etc/systemd/network/20-bond-{}.netdev'.format(bond)] = {
|
||||||
|
|
Loading…
Reference in a new issue