bundles/openvpn-client: add
This commit is contained in:
parent
e515378497
commit
df9863ef31
3 changed files with 29 additions and 0 deletions
21
bundles/openvpn-client/items.py
Normal file
21
bundles/openvpn-client/items.py
Normal 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',
|
||||||
|
},
|
||||||
|
}
|
7
bundles/openvpn-client/metadata.py
Normal file
7
bundles/openvpn-client/metadata.py
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
defaults = {
|
||||||
|
'apt': {
|
||||||
|
'packages': {
|
||||||
|
'openvpn': {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
1
data/openvpn-client/c3voc.conf.vault
Normal file
1
data/openvpn-client/c3voc.conf.vault
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue