bundles/wireguard: add netdev and network files, add iptables rules
All checks were successful
bundlewrap/pipeline/head This commit looks good
All checks were successful
bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
e2490df48e
commit
58ca3fa9ae
8 changed files with 168 additions and 8 deletions
26
bundles/wireguard/items.py
Normal file
26
bundles/wireguard/items.py
Normal file
|
@ -0,0 +1,26 @@
|
|||
assert node.has_bundle('systemd-networkd')
|
||||
|
||||
files = {
|
||||
'/etc/systemd/network/99-wg0.netdev': {
|
||||
'source': 'wg0.netdev',
|
||||
'content_type': 'mako',
|
||||
'context': node.metadata['wireguard'],
|
||||
'needs': {
|
||||
'pkg_apt:wireguard',
|
||||
},
|
||||
'triggers': {
|
||||
'svc_systemd:systemd-networkd:restart',
|
||||
},
|
||||
},
|
||||
'/etc/systemd/network/99-wg0.network': {
|
||||
'source': 'wg0.network',
|
||||
'content_type': 'mako',
|
||||
'context': node.metadata['wireguard'],
|
||||
'needs': {
|
||||
'pkg_apt:wireguard',
|
||||
},
|
||||
'triggers': {
|
||||
'svc_systemd:systemd-networkd:restart',
|
||||
},
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue