bundles/systemd-networkd: rework routes
This commit is contained in:
parent
b52a196c73
commit
d787f8b0a3
2 changed files with 8 additions and 7 deletions
|
@ -16,10 +16,12 @@ Name=${interface}
|
||||||
Address=${ip}/${prefix}
|
Address=${ip}/${prefix}
|
||||||
|
|
||||||
% endfor
|
% endfor
|
||||||
% for route in config.get('routes', {}):
|
% for route, rconfig in sorted(config.get('routes', {}).items()):
|
||||||
[Route]
|
[Route]
|
||||||
|
% if 'via' in rconfig:
|
||||||
Gateway=${route['via']}
|
Gateway=${route['via']}
|
||||||
Destination=${route['to']}
|
% endif
|
||||||
|
Destination=${route}
|
||||||
GatewayOnlink=yes
|
GatewayOnlink=yes
|
||||||
|
|
||||||
% endfor
|
% endfor
|
||||||
|
|
|
@ -17,13 +17,12 @@ nodes['home.downloadhelper'] = {
|
||||||
'ips': {
|
'ips': {
|
||||||
'172.19.138.27/24',
|
'172.19.138.27/24',
|
||||||
},
|
},
|
||||||
'routes': [
|
'routes': {
|
||||||
{
|
# VPN
|
||||||
# VPN
|
'172.19.136.0/22': {
|
||||||
'to': '172.19.136.0/22',
|
|
||||||
'via': '172.19.138.1',
|
'via': '172.19.138.1',
|
||||||
},
|
},
|
||||||
],
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'backups': {
|
'backups': {
|
||||||
|
|
Loading…
Reference in a new issue