bundles/openssh: move iptables rules to metadata reactor
All checks were successful
bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2021-03-21 10:37:28 +01:00
parent b943d2d465
commit c9f008ad82
Signed by: kunsi
GPG key ID: 12E3D2136B818350
3 changed files with 14 additions and 6 deletions

View file

@ -1,3 +1,5 @@
from bundlewrap.metadata import atomic
defaults = {
'apt': {
'packages': {
@ -12,3 +14,15 @@ defaults = {
},
},
}
@metadata_reactor.provides(
'iptables/port_rules/22',
)
def iptables(metadata):
return {
'iptables': {
'port_rules': {
'22': atomic(metadata.get('openssh/restrict-to', set('*'))),
},
},
}