X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/7ef879d12f2d2b0424d3d35cd96b604cb70e312c..4dbf2ca8fe7b7c1d384a1586322464e3317e1d22:/cookbooks/networking/templates/default/network.erb diff --git a/cookbooks/networking/templates/default/network.erb b/cookbooks/networking/templates/default/network.erb index ea414bd37..6e1493738 100644 --- a/cookbooks/networking/templates/default/network.erb +++ b/cookbooks/networking/templates/default/network.erb @@ -31,6 +31,7 @@ Metric=<%= @interface[:metric] %> <% end -%> <% end -%> <% Hash(@interface.dig(:inet, :routes)).sort.each do |destination, details| -%> +<% unless details[:via] == @interface[:inet][:address] -%> [Route] <% if details[:via] -%> @@ -44,7 +45,9 @@ Metric=<%= details[:metric] %> Type=<%= details[:type] %> <% end -%> <% end -%> +<% end -%> <% Hash(@interface.dig(:inet6, :routes)).sort.each do |destination, details| -%> +<% unless details[:via] == @interface[:inet6][:address] -%> [Route] <% if details[:via] -%> @@ -58,3 +61,4 @@ Metric=<%= details[:metric] %> Type=<%= details[:type] %> <% end -%> <% end -%> +<% end -%>