- node.default[:networking][:interfaces][name][:metric] = role[:metric]
- node.default[:networking][:interfaces][name][:zone] = role[:zone]
- end
+node[:networking][:interfaces].each do |name, interface|
+ if interface[:interface]
+ network_packages |= ["vlan"] if interface[:interface] =~ /\.\d+$/
+ network_packages |= ["ifenslave"] if interface[:bond]
+
+ if interface[:role] && (role = node[:networking][:roles][interface[:role]])
+ if role[interface[:family]]
+ node.normal[:networking][:interfaces][name][:prefix] = role[interface[:family]][:prefix]
+ node.normal[:networking][:interfaces][name][:gateway] = role[interface[:family]][:gateway]
+ end