bundles/docker-ce: add nftables rules
This commit is contained in:
parent
efdff6ef28
commit
071250d798
2 changed files with 27 additions and 1 deletions
|
@ -12,4 +12,30 @@ defaults = {
|
|||
'docker-ce-cli': {},
|
||||
},
|
||||
},
|
||||
'nftables': {
|
||||
'rules': {
|
||||
'00-docker-ce': {
|
||||
'inet filter forward ct state { related, established } accept',
|
||||
'inet filter forward iifname docker0 accept',
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@metadata_reactor.provides(
|
||||
'nftables/rules/00-docker-ce',
|
||||
)
|
||||
def nftables_nat(metadata):
|
||||
rules = set()
|
||||
|
||||
for iface in metadata.get('interfaces'):
|
||||
rules.add(f'nat postrouting oifname {iface} masquerade')
|
||||
|
||||
return {
|
||||
'nftables': {
|
||||
'rules': {
|
||||
'00-docker-ce': rules,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ actions['install_woodpecker-agent'] = {
|
|||
'dpkg -i /tmp/woodpecker-agent.deb',
|
||||
]),
|
||||
'unless': f'''bash -c "[[ \"$(woodpecker-agent --version | cut -d' ' -f3)\" == "{version}" ]]"''',
|
||||
'triggers': {i
|
||||
'triggers': {
|
||||
'svc_systemd:woodpecker-agent:restart',
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue