Fix style issues found by new rubocop version
[chef.git] / cookbooks / networking / recipes / default.rb
index fe01c04e5634919c7d15c04c41b524805e535d20..477a15b240741795c392b88d10db8d0a5365a092 100644 (file)
@@ -23,7 +23,7 @@
 require "ipaddr"
 
 node[:networking][:interfaces].each do |name, interface|
-  if interface[:role] && role = node[:networking][:roles][interface[:role]]
+  if interface[:role] && (role = node[:networking][:roles][interface[:role]])
     if role[interface[:family]]
       node.set[:networking][:interfaces][name][:prefix] = role[interface[:family]][:prefix]
       node.set[:networking][:interfaces][name][:gateway] = role[interface[:family]][:gateway]