systemd-networkd: first draft
This commit is contained in:
parent
aa477322ac
commit
fbb4e2f7a5
4 changed files with 59 additions and 0 deletions
22
bundles/systemd-networkd/items.py
Normal file
22
bundles/systemd-networkd/items.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
assert node.has_bundle('systemd')
|
||||
|
||||
files = {
|
||||
'/etc/network/interfaces': {},
|
||||
}
|
||||
|
||||
for interface, config in node.metadata.get('interfaces', {}).items():
|
||||
files['/etc/systemd/network/10-{}.network'.format(interface)] = {
|
||||
'source': 'template.network',
|
||||
'content_type': 'mako',
|
||||
'context': {
|
||||
'interface': interface,
|
||||
'config': config,
|
||||
},
|
||||
'triggers': {
|
||||
'svc_systemd:systemd-networkd:restart',
|
||||
},
|
||||
}
|
||||
|
||||
svc_systemd = {
|
||||
'systemd-networkd': {},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue