add bundle:jool

This commit is contained in:
Franzi 2024-02-26 07:22:54 +01:00
parent 4514541e8f
commit 12c6b5fc54
Signed by: kunsi
GPG key ID: 12E3D2136B818350
6 changed files with 46 additions and 4 deletions

15
bundles/jool/items.py Normal file
View file

@ -0,0 +1,15 @@
actions['modprobe_jool'] = {
'command': 'modprobe jool',
'unless': 'lsmod | grep -F jool',
}
actions['jool_add_nat64_instance'] = {
'command': 'jool instance add "nat64" --netfilter --pool6 64:ff9b::/96',
'unless': 'jool instance display --no-headers --csv | grep -E ",nat64,netfilter$"',
'needs': {
'action:modprobe_jool',
'pkg_apt:jool-dkms',
'pkg_apt:jool-tools',
'pkg_apt:linux-headers-amd64',
},
}

14
bundles/jool/metadata.py Normal file
View file

@ -0,0 +1,14 @@
defaults = {
'apt': {
'packages': {
'jool-dkms': {},
'jool-tools': {},
'linux-headers-amd64': {},
},
},
'modules': {
'jool': [
'jool',
],
},
}

View file

@ -0,0 +1,8 @@
# This file is managed using bundlewrap
% for identifier, modules in sorted(node.metadata.get('modules', {}).items()):
# ${identifier}
% for module in modules:
${module}
% endfor
% endfor

View file

@ -0,0 +1,3 @@
files['/etc/modules'] = {
'content_type': 'mako',
}

View file

@ -1,6 +1,11 @@
server:
# provided by pkg_apt:unbound-anchor
auto-trust-anchor-file: "/var/lib/unbound/root.key"
% if node.has_bundle('jool'):
module-config: "dns64 validator iterator"
% else:
module-config: "validator iterator"
% endif
verbosity: 0
@ -23,10 +28,6 @@ server:
access-control: ::1 allow
% endif
% if node.has_bundle('pppd'):
prefer-ip4: yes
% endif
msg-cache-size: ${cache_size}
msg-cache-slabs: ${cache_slabs}
rrset-cache-size: ${cache_size}

View file

@ -20,6 +20,7 @@ groups['linux'] = {
'bundles': {
'basic',
'cron',
'kernel-modules',
'nftables',
'openssh',
'postfix',