Respect dhcp_use_routes in lxc_container_networks

Due to the typo during coversion to systemd_networkd format,
dhcp_use_routes are assumed to be added through config_overrides.
Intention was to add `UseRoutes` value into [DHCP] section. But instead
it adds `DHCP` option under {DEFAULT] section.

Change-Id: I75ad2fc575cce7892825fcbacc6c3fb6d2579211
This commit is contained in:
Dmitriy Rabotyagov 2024-07-06 18:49:03 +02:00
parent 8d83117f39
commit 3a5f7651e9

View File

@ -46,7 +46,7 @@ _lxc_container_systemd_networks: |
'mtu': network.mtu | default(),
'static_routes': network.static_routes | default([]),
'usedns': ('dhcp_use_dns' in network) | ternary(network.dhcp_use_dns, lxc_container_enable_resolved | bool),
'config_overrides': ('dhcp_use_routes' in network) | ternary({'DHCP': network.dhcp_use_routes}, {})
'config_overrides': ('dhcp_use_routes' in network) | ternary({'DHCP': {'UseRoutes': network.dhcp_use_routes}}, {})
}) %}
{% endfor %}
{{ systemd_networks }}