X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/6d24931ebf66ec9f5382a0fd9b12f766b77a912c..1b506c7210655ca2f4ea844cd076e44869d6e6a2:/cookbooks/networking/recipes/default.rb diff --git a/cookbooks/networking/recipes/default.rb b/cookbooks/networking/recipes/default.rb index fe01c04e5..477a15b24 100644 --- a/cookbooks/networking/recipes/default.rb +++ b/cookbooks/networking/recipes/default.rb @@ -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]