]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/networking/templates/default/interfaces.erb
Configure external address for fafnir
[chef.git] / cookbooks / networking / templates / default / interfaces.erb
index 89fc316eb4aa1810321eda4af1787a498c9c8bdb..50238cb5f885ff16cb55970d1c7173c4ceb9c9b7 100644 (file)
@@ -2,6 +2,7 @@
 
 iface lo inet loopback
 <% node[:networking][:interfaces].each do |name,interface| -%>
 
 iface lo inet loopback
 <% node[:networking][:interfaces].each do |name,interface| -%>
+<% if interface[:interface] -%>
 
 iface <%= interface[:interface] %> <%= interface[:family] %> static
       address   <%= interface[:address] %>
 
 iface <%= interface[:interface] %> <%= interface[:family] %> static
       address   <%= interface[:address] %>
@@ -31,5 +32,6 @@ iface <%= interface[:interface] %> <%= interface[:family] %> static
       autoconf  0
 <% end -%>
 <% end -%>
       autoconf  0
 <% end -%>
 <% end -%>
+<% end -%>
 
 
-auto lo <%= node[:networking][:interfaces].collect { |n,i| i[:interface] }.sort.uniq.join(" ") %>
+auto lo <%= node[:networking][:interfaces].collect { |n,i| i[:interface] }.compact.sort.uniq.join(" ") %>