add c3voc vpn to kunsi-p14s
This commit is contained in:
parent
f3d741de41
commit
bc589011d2
4 changed files with 32 additions and 8 deletions
|
@ -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,
|
||||
}
|
||||
|
|
|
@ -1,7 +1,20 @@
|
|||
defaults = {
|
||||
'apt': {
|
||||
'packages': {
|
||||
'openvpn': {},
|
||||
'openvpn': {
|
||||
'needed_by': {
|
||||
'directory:/etc/openvpn/client',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
'pacman': {
|
||||
'packages': {
|
||||
'openvpn': {
|
||||
'needed_by': {
|
||||
'directory:/etc/openvpn/client',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
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
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue