bundlewrap/bundles/openssh/metadata.py
Franzi c9f008ad82
All checks were successful
bundlewrap/pipeline/head This commit looks good
bundles/openssh: move iptables rules to metadata reactor
2021-03-21 10:37:28 +01:00

29 lines
555 B
Python

from bundlewrap.metadata import atomic
defaults = {
'apt': {
'packages': {
'openssh-client': {},
'openssh-server': {},
'openssh-sftp-server': {},
},
},
'pacman': {
'packages': {
'openssh': {},
},
},
}
@metadata_reactor.provides(
'iptables/port_rules/22',
)
def iptables(metadata):
return {
'iptables': {
'port_rules': {
'22': atomic(metadata.get('openssh/restrict-to', set('*'))),
},
},
}