unsymlink_bundles #2

Merged
stillbeben merged 14 commits from unsymlink_bundles into main 2021-12-21 16:51:44 +00:00
2 changed files with 8 additions and 24 deletions
Showing only changes of commit 592cacb7b8 - Show all commits

View file

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

View file

@ -1,20 +1,5 @@
from bundlewrap.metadata import atomic from bundlewrap.metadata import atomic
defaults = {
'apt': {
'packages': {
'openssh-client': {},
'openssh-server': {},
'openssh-sftp-server': {},
},
},
'pacman': {
'packages': {
'openssh': {},
},
},
}
@metadata_reactor.provides( @metadata_reactor.provides(
'firewall/port_rules/22', 'firewall/port_rules/22',
) )