From fcf041f0878f3d0c8ba10811d2e1466376310d88 Mon Sep 17 00:00:00 2001 From: Lars Beckers <lars.beckers@rwth-aachen.de> Date: Sun, 24 Jan 2021 17:09:07 +0100 Subject: [PATCH] networkd: add GatewayOnLink route option --- networkd/templates/20-wired-routed.network.j2 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/networkd/templates/20-wired-routed.network.j2 b/networkd/templates/20-wired-routed.network.j2 index 7054162..a21a814 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 %} -- GitLab