2 Name=<%= @interface[:interface] %>
5 <% if @interface[:inet] -%>
6 Address=<%= @interface[:inet][:address] %>/<%== @interface[:inet][:prefix] %>
8 <% if @interface[:inet6] -%>
9 Address=<%= @interface[:inet6][:address] %>/<%== @interface[:inet6][:prefix] %>
12 <% Array(@interface[:vlans]).sort.uniq.each do |vlan| -%>
13 VLAN=<%= @interface[:interface] %>.<%= vlan %>
15 <% if @interface.dig(:inet, :gateway) && @interface[:inet][:gateway] != @interface[:inet][:address] -%>
18 Gateway=<%= @interface[:inet][:gateway] %>
20 <% if @interface[:metric] -%>
21 Metric=<%= @interface[:metric] %>
24 <% if @interface.dig(:inet6, :gateway) && @interface[:inet6][:gateway] != @interface[:inet6][:address] -%>
27 Gateway=<%= @interface[:inet6][:gateway] %>
29 <% if @interface[:metric] -%>
30 Metric=<%= @interface[:metric] %>
33 <% Hash(@interface.dig(:inet, :routes)).sort.each do |destination, details| -%>
34 <% unless details[:via] == @interface[:inet][:address] -%>
37 <% if details[:via] -%>
38 Gateway=<%= details[:via] %>
40 Destination=<%= destination %>
41 <% if details[:metric] -%>
42 Metric=<%= details[:metric] %>
44 <% if details[:type] -%>
45 Type=<%= details[:type] %>
49 <% Hash(@interface.dig(:inet6, :routes)).sort.each do |destination, details| -%>
50 <% unless details[:via] == @interface[:inet6][:address] -%>
53 <% if details[:via] -%>
54 Gateway=<%= details[:via] %>
56 Destination=<%= destination %>
57 <% if details[:metric] -%>
58 Metric=<%= details[:metric] %>
60 <% if details[:type] -%>
61 Type=<%= details[:type] %>