bundles/openvpn-client: add

This commit is contained in:
Franzi 2020-11-13 22:15:36 +01:00
parent e515378497
commit df9863ef31
Signed by: kunsi
GPG key ID: 12E3D2136B818350
3 changed files with 29 additions and 0 deletions

View file

@ -0,0 +1,21 @@
from os.path import join
directories = {
'/etc/openvpn/client': {
'purge': True,
},
}
for config in node.metadata.get('openvpn-client', {}).get('configs', set()):
files[f'/etc/openvpn/client/{config}.conf'] = {
'content': repo.vault.decrypt_file(join('openvpn-client', f'{config}.conf.vault')),
'triggers': {
f'svc_systemd:openvpn-client@{config}:restart',
},
}
svc_systemd[f'openvpn-client@{config}'] = {
'needs': {
f'file:/etc/openvpn/client/{config}.conf',
},
}

View file

@ -0,0 +1,7 @@
defaults = {
'apt': {
'packages': {
'openvpn': {},
},
},
}

File diff suppressed because one or more lines are too long