diff --git a/networkd/templates/20-wired-routed.network.j2 b/networkd/templates/20-wired-routed.network.j2 index 7054162101e0394b6d8b632dc1666d77973627e9..a21a81483deb2bad533ecfeb3adcd5759509708d 100644 --- a/networkd/templates/20-wired-routed.network.j2 +++ b/networkd/templates/20-wired-routed.network.j2 @@ -22,6 +22,13 @@ IPForward=yes {% if route.gateway is defined %} Gateway={{ route.gateway }} {% endif %} +{% if route.gateway_on_link is defined %} +{% if ansible_distribution_major_version|int <= 10 %} +GatewayOnlink={{ route.gateway_on_link }} +{% else %} +GatewayOnLink={{ route.gateway_on_link }} +{% endif %} +{% endif %} {% if route.destination is defined %} Destination={{ route.destination }} {% endif %}