bundles: fix usage of set() vs {}
All checks were successful
bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2021-04-04 10:34:55 +02:00
parent c418102000
commit e36a352a42
Signed by: kunsi
GPG key ID: 12E3D2136B818350
8 changed files with 14 additions and 14 deletions

View file

@ -74,10 +74,10 @@ def iptables(metadata):
'iptables': { 'iptables': {
'port_rules': { 'port_rules': {
# imap(s) # imap(s)
'143': atomic(metadata.get('dovecot/restrict-to', set('*'))), '143': atomic(metadata.get('dovecot/restrict-to', {'*'})),
'993': atomic(metadata.get('dovecot/restrict-to', set('*'))), '993': atomic(metadata.get('dovecot/restrict-to', {'*'})),
# managesieve # managesieve
'4190': atomic(metadata.get('dovecot/restrict-to', set('*'))), '4190': atomic(metadata.get('dovecot/restrict-to', {'*'})),
}, },
}, },
} }

View file

@ -50,7 +50,7 @@ def iptables(metadata):
return { return {
'iptables': { 'iptables': {
'port_rules': { 'port_rules': {
'8080': atomic(metadata.get('kodi/restrict-to', set('*'))), '8080': atomic(metadata.get('kodi/restrict-to', {'*'})),
}, },
}, },
} }

View file

@ -159,8 +159,8 @@ def iptables(metadata):
return { return {
'iptables': { 'iptables': {
'port_rules': { 'port_rules': {
'80': atomic(metadata.get('nginx/restrict-to', set('*'))), '80': atomic(metadata.get('nginx/restrict-to', {'*'})),
'443': atomic(metadata.get('nginx/restrict-to', set('*'))), '443': atomic(metadata.get('nginx/restrict-to', {'*'})),
}, },
}, },
} }

View file

@ -16,7 +16,7 @@ def iptables(metadata):
return { return {
'iptables': { 'iptables': {
'port_rules': { 'port_rules': {
'113': atomic(metadata.get('oidentd/restrict-to', set('*'))), '113': atomic(metadata.get('oidentd/restrict-to', {'*'})),
}, },
}, },
} }

View file

@ -22,7 +22,7 @@ def iptables(metadata):
return { return {
'iptables': { 'iptables': {
'port_rules': { 'port_rules': {
'22': atomic(metadata.get('openssh/restrict-to', set('*'))), '22': atomic(metadata.get('openssh/restrict-to', {'*'})),
}, },
}, },
} }

View file

@ -77,7 +77,7 @@ def letsencrypt(metadata):
) )
def iptables(metadata): def iptables(metadata):
if node.has_bundle('postfixadmin'): if node.has_bundle('postfixadmin'):
default = set('*') default = {'*'}
else: else:
default = metadata.get('postfix/mynetworks', set()) default = metadata.get('postfix/mynetworks', set())

View file

@ -176,8 +176,8 @@ def iptables(metadata):
return { return {
'iptables': { 'iptables': {
'port_rules': { 'port_rules': {
'53': atomic(metadata.get('powerdns/restrict-to', set('*'))), '53': atomic(metadata.get('powerdns/restrict-to', {'*'})),
'53/udp': atomic(metadata.get('powerdns/restrict-to', set('*'))), '53/udp': atomic(metadata.get('powerdns/restrict-to', {'*'})),
}, },
}, },
} }

View file

@ -42,9 +42,9 @@ def iptables(metadata):
return { return {
'iptables': { 'iptables': {
'port_rules': { 'port_rules': {
str(metadata.get('transmission/config/peer-port')): set('*'), str(metadata.get('transmission/config/peer-port')): atomic({'*'}),
str(metadata.get('transmission/config/peer-port')) + '/udp': set('*'), str(metadata.get('transmission/config/peer-port')) + '/udp': atomic({'*'}),
str(metadata.get('transmission/config/rpc-port')): atomic(metadata.get('transmission/restrict-to', set('*'))), str(metadata.get('transmission/config/rpc-port')): atomic(metadata.get('transmission/restrict-to', {'*'})),
}, },
}, },
} }