add c3voc vpn to kunsi-p14s

This commit is contained in:
Franzi 2022-11-21 19:31:49 +01:00
parent f3d741de41
commit bc589011d2
Signed by: kunsi
GPG key ID: 12E3D2136B818350
4 changed files with 32 additions and 8 deletions

View file

@ -3,20 +3,21 @@ from os.path import join
directories = {
'/etc/openvpn/client': {
'purge': True,
'mode': '0750',
},
}
for config in node.metadata.get('openvpn-client/configs', set()):
files[f'/etc/openvpn/client/{config}.conf'] = {
'content': repo.vault.decrypt_file(join('openvpn-client', f'{config}.conf.vault')),
for fname, config in node.metadata.get('openvpn-client/configs', {}).items():
files[f'/etc/openvpn/client/{fname}.conf'] = {
'content': repo.vault.decrypt_file(join('openvpn-client', f'{fname}.conf.vault')),
'triggers': {
f'svc_systemd:openvpn-client@{config}:restart',
},
} if config.get('running', True) else set(),
}
svc_systemd[f'openvpn-client@{config}'] = {
svc_systemd[f'openvpn-client@{fname}'] = {
'needs': {
f'file:/etc/openvpn/client/{config}.conf',
'pkg_apt:openvpn',
f'file:/etc/openvpn/client/{fname}.conf',
},
**config,
}

View file

@ -1,7 +1,20 @@
defaults = {
'apt': {
'packages': {
'openvpn': {},
'openvpn': {
'needed_by': {
'directory:/etc/openvpn/client',
},
},
},
},
'pacman': {
'packages': {
'openvpn': {
'needed_by': {
'directory:/etc/openvpn/client',
},
},
},
},
}

File diff suppressed because one or more lines are too long

View file

@ -6,6 +6,7 @@ nodes['kunsi-p14s'] = {
'lldp',
'lm-sensors',
'nfs-client',
'openvpn-client',
'systemd-boot',
'telegraf-battery-usage',
'vmhost',
@ -69,6 +70,14 @@ nodes['kunsi-p14s'] = {
'ipv6',
},
},
'openvpn-client': {
'configs': {
'c3voc': {
'running': None,
'enabled': False,
},
},
},
'pacman': {
'no_extract': {
'etc/sudoers.d/ctdb', # samba junk