cp over all the bundles from kunsis bw repo

This commit is contained in:
Rico 2021-12-21 15:56:24 +01:00
parent 65b117b819
commit 1f73b04351
Signed by: stillbeben
GPG key ID: AE1066B5BD0B5041
89 changed files with 3991 additions and 0 deletions

View file

@ -0,0 +1,3 @@
% for nameserver in sorted(node.metadata.get('nameservers', {'9.9.9.10', '2620:fe::10'})):
nameserver ${nameserver}
% endfor

View file

@ -0,0 +1,13 @@
[NetDev]
Name=${bond}
Kind=bond
[Bond]
Mode=${mode}
% if mode in {'balance-rr', '802.3ad', 'balance-tlp'}:
TransmitHashPolicy=layer3+4
% endif
MIIMonitorSec=0.1
% if mode == '802.3ad':
LACPTransmitRate=fast
% endif

View file

@ -0,0 +1,5 @@
[Match]
Name=${' '.join(sorted(match))}
[Network]
Bond=${bond}

View file

@ -0,0 +1,7 @@
[Match]
Name=${bridge}
[Network]
% for vlan in sorted(vlans):
VLAN=${bridge}.${vlan}
% endfor

View file

@ -0,0 +1,6 @@
[NetDev]
Name=${bridge}
Kind=bridge
[Bridge]
STP=off

View file

@ -0,0 +1,6 @@
[Match]
Name=${' '.join(sorted(match))}
[Network]
Bridge=${bridge}
BindCarrier=${' '.join(sorted(match))}

View file

@ -0,0 +1,3 @@
[NetDev]
Name=${name}
Kind=dummy

View file

@ -0,0 +1,27 @@
<%
from ipaddress import ip_network
%>\
[Match]
Name=${interface}
[Network]
DHCP=yes
IPv6AcceptRA=yes
[DHCPv4]
UseDomains=${str(config.get('use_dhcp_domains', False)).lower()}
UseHostname=no
UseMTU=${str(config.get('use_dhcp_mtu', True)).lower()}
UseNTP=${str(config.get('use_dhcp_ntp', False)).lower()}
UseTimezone=no
% if config.get('send_hostname', True):
SendHostname=yes
Hostname=${node.name.split('.')[-1]}
% else:
SendHostname=no
% endif
% if config.get('forwarding', False):
IPForward=yes
%endif

View file

@ -0,0 +1,50 @@
<%
from ipaddress import ip_network
%>\
[Match]
Name=${interface}
% for addr in sorted(config.get('ips', set())):
[Address]
<%
if '/' in addr:
ip, prefix = addr.split('/')
else:
ip = addr
prefix = '32'
%>\
Address=${ip}/${prefix}
% endfor
% for route, rconfig in sorted(config.get('routes', {}).items()):
[Route]
% if 'via' in rconfig:
Gateway=${rconfig['via']}
% endif
Destination=${route}
GatewayOnlink=yes
% endfor
% if 'gateway4' in config:
[Route]
Gateway=${config['gateway4']}
GatewayOnlink=yes
% endif
% if 'gateway6' in config:
[Route]
Gateway=${config['gateway6']}
GatewayOnlink=yes
% endif
[Network]
DHCP=no
IPv6AcceptRA=no
% if config.get('forwarding', False):
IPForward=yes
%endif
% for vlan in sorted(config.get('vlans', set())):
VLAN=${interface}.${vlan}
% endfor

View file

@ -0,0 +1,7 @@
[NetDev]
Name=${interface}
Kind=vlan
MACAddress=${mac}
[VLAN]
Id=${vlan}