bundles/nftables: introduce

This commit is contained in:
Franzi 2021-06-03 13:57:50 +02:00
parent faf27a3940
commit ecb67d012b
Signed by: kunsi
GPG key ID: 12E3D2136B818350
3 changed files with 198 additions and 0 deletions

35
bundles/nftables/items.py Normal file
View file

@ -0,0 +1,35 @@
if node.has_bundle('pacman'):
package = 'pkg_pacman:nftables'
else:
package = 'pkg_apt:nftables'
directories = {
# used by other bundles
'/etc/nftables-rules.d': {
'purge': True,
'triggers': {
'svc_systemd:nftables:reload',
},
},
}
files = {
'/etc/nftables.conf': {
'content_type': 'mako',
'needs': {
'directory:/etc/nftables-rules.d',
},
'triggers': {
'svc_systemd:nftables:reload',
},
},
}
svc_systemd = {
'nftables': {
'needs': {
'file:/etc/nftables.conf',
package,
},
},
}