Add support for bonding and VLANs
[chef.git] / cookbooks / networking / templates / default / interfaces.erb
index 50238cb5f885ff16cb55970d1c7173c4ceb9c9b7..1b3e1a9890a88e8db62cf78c8fa0523af64e70ca 100644 (file)
@@ -31,6 +31,14 @@ iface <%= interface[:interface] %> <%= interface[:family] %> static
 <% if interface[:family] == "inet6" -%>
       autoconf  0
 <% end -%>
+<% if interface[:bond] -%>
+      bond-mode <%= interface[:bond][:mode] || "active-backup" %>
+      bond-slaves <%= interface[:bond][:slaves].join(" ") %>
+      bond-primary <%= interface[:bond][:slaves].first %>
+      bond-miimon <%= interface[:bond][:miimon] || 100 %>
+      bond-downdelay <%= interface[:bond][:downdelay] || 200 %>
+      bond-updelay <%= interface[:bond][:updelay] || 200 %>
+<% end -%>
 <% end -%>
 <% end -%>