bundles/pacman: introduce, support pkg_pacman in some other bundles

This commit is contained in:
Franzi 2021-02-18 14:24:57 +01:00
parent 9bf7f856af
commit 32d129015e
Signed by: kunsi
GPG key ID: 12E3D2136B818350
4 changed files with 46 additions and 3 deletions

View file

@ -26,22 +26,29 @@ files = {
},
}
if node.has_bundle('pacman'):
package = 'pkg_pacman:openssh'
service = 'sshd'
else:
package = 'pkg_apt:openssh-server'
service = 'ssh'
actions = {
'sshd_check_config': {
'command': 'sshd -T -C user=root -C host=localhost -C addr=localhost',
'triggered': True,
'triggers': {
'svc_systemd:ssh:restart',
'svc_systemd:{}:restart'.format(service),
},
},
}
svc_systemd = {
'ssh': {
service: {
'needs': {
'pkg_apt:openssh-server',
'file:/etc/systemd/system/ssh.service.d/bundlewrap.conf',
'file:/etc/ssh/sshd_config',
package,
},
},
}

View file

@ -6,4 +6,9 @@ defaults = {
'openssh-sftp-server': {},
},
},
'pacman': {
'packages': {
'openssh': {},
},
},
}