bundlewrap/bundles/openssh/metadata.py

29 lines
553 B
Python
Raw Permalink Normal View History

from bundlewrap.metadata import atomic
defaults = {
'apt': {
'packages': {
'openssh-client': {},
'openssh-server': {},
'openssh-sftp-server': {},
},
},
'pacman': {
'packages': {
'openssh': {},
},
},
}
@metadata_reactor.provides(
2023-09-24 18:59:58 +00:00
'firewall/port_rules',
)
def firewall(metadata):
return {
'firewall': {
'port_rules': {
2023-09-24 18:59:58 +00:00
'22/tcp': atomic(metadata.get('openssh/restrict-to', {'*'})),
},
},
}