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| -%>
36 <% if details[:via] -%>
37 Gateway=<%= details[:via] %>
39 Destination=<%= destination %>
40 <% if details[:metric] -%>
41 Metric=<%= details[:metric] %>
43 <% if details[:type] -%>
44 Type=<%= details[:type] %>
47 <% Hash(@interface.dig(:inet6, :routes)).sort.each do |destination, details| -%>
50 <% if details[:via] -%>
51 Gateway=<%= details[:via] %>
53 Destination=<%= destination %>
54 <% if details[:metric] -%>
55 Metric=<%= details[:metric] %>
57 <% if details[:type] -%>
58 Type=<%= details[:type] %>