debian 13 #25
6 changed files with 21 additions and 7 deletions
|
@ -25,6 +25,9 @@ files= {
|
||||||
'svc_systemd:systemd-sysctl.service:restart',
|
'svc_systemd:systemd-sysctl.service:restart',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
'/etc/modules-load.d/managed.conf': {
|
||||||
|
'content': '\n'.join(sorted(node.metadata.get('modules-load'))),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
svc_systemd = {
|
svc_systemd = {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
defaults = {
|
defaults = {
|
||||||
'sysctl': {},
|
'sysctl': {},
|
||||||
|
'modules-load': set(),
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,10 +34,12 @@ def dhcp(metadata):
|
||||||
|
|
||||||
@metadata_reactor.provides(
|
@metadata_reactor.provides(
|
||||||
'systemd/units',
|
'systemd/units',
|
||||||
|
'modules-load',
|
||||||
)
|
)
|
||||||
def units(metadata):
|
def units(metadata):
|
||||||
if node.has_bundle('systemd-networkd'):
|
if node.has_bundle('systemd-networkd'):
|
||||||
units = {}
|
units = {}
|
||||||
|
modules_load = set()
|
||||||
|
|
||||||
for network_name, network_conf in metadata.get('network').items():
|
for network_name, network_conf in metadata.get('network').items():
|
||||||
interface_type = network_conf.get('type', None)
|
interface_type = network_conf.get('type', None)
|
||||||
|
@ -96,13 +98,15 @@ def units(metadata):
|
||||||
|
|
||||||
# cake WIP
|
# cake WIP
|
||||||
|
|
||||||
# if 'cake' in network_conf:
|
if 'cake' in network_conf:
|
||||||
# units[f'{network_name}.network']['CAKE'] = network_conf['cake']
|
units[f'{network_name}.network']['CAKE'] = network_conf['cake']
|
||||||
|
modules_load.add('sch_cake')
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'systemd': {
|
'systemd': {
|
||||||
'units': units,
|
'units': units,
|
||||||
}
|
},
|
||||||
|
'modules-load': modules_load,
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
return {}
|
return {}
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
files = {
|
files = {
|
||||||
'/etc/modules-load.d/pppoe.conf': {
|
|
||||||
'content': 'pppoe\npppox\nppp_generic',
|
|
||||||
'mode': '0644',
|
|
||||||
},
|
|
||||||
'/etc/ppp/peers/isp': {
|
'/etc/ppp/peers/isp': {
|
||||||
'content_type': 'mako',
|
'content_type': 'mako',
|
||||||
'mode': '0644',
|
'mode': '0644',
|
||||||
|
|
|
@ -4,6 +4,11 @@ defaults = {
|
||||||
'pppoe': {},
|
'pppoe': {},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
'modules-load': {
|
||||||
|
'pppoe',
|
||||||
|
'pppox',
|
||||||
|
'ppp_generic',
|
||||||
|
},
|
||||||
'nftables': {
|
'nftables': {
|
||||||
'nat': {
|
'nat': {
|
||||||
'oifname ppp0 masquerade',
|
'oifname ppp0 masquerade',
|
||||||
|
|
|
@ -17,6 +17,11 @@
|
||||||
'gateway4': '51.68.188.1',
|
'gateway4': '51.68.188.1',
|
||||||
'ipv6': '2001:41d0:701:1100::751a/128',
|
'ipv6': '2001:41d0:701:1100::751a/128',
|
||||||
'gateway6': '2001:41d0:701:1100::1',
|
'gateway6': '2001:41d0:701:1100::1',
|
||||||
|
'cake': {
|
||||||
|
'Bandwidth': '350M',
|
||||||
|
'FlowIsolationMode': 'triple',
|
||||||
|
'RTTSec': '100ms',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'bind': {
|
'bind': {
|
||||||
|
|
Loading…
Reference in a new issue