bundles/wireguard: add option to set settings based on a specific peer
This commit is contained in:
parent
0084257872
commit
ffb5125ddd
3 changed files with 10 additions and 0 deletions
|
@ -14,4 +14,6 @@ PresharedKey=${psk}
|
|||
% if endpoint:
|
||||
Endpoint=${endpoint}
|
||||
% endif
|
||||
% if specials.get('persistent_keepalive', True):
|
||||
PersistentKeepalive=30
|
||||
% endif
|
||||
|
|
|
@ -27,6 +27,7 @@ for peer, config in sorted(node.metadata.get('wireguard/peers', {}).items()):
|
|||
'privatekey': node.metadata.get('wireguard/privatekey'),
|
||||
'psk': config['psk'],
|
||||
'pubkey': config['pubkey'],
|
||||
'specials': repo.libs.s2s.WG_AUTOGEN_SETTINGS.get(peer, {}),
|
||||
},
|
||||
'needs': deps,
|
||||
'triggers': {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue