X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/fb1f1d56e8d8a6a86b79c71546e6c114fec2640c..29e2c1a969f226660eac316bd713c0c8c31e9133:/cookbooks/networking/libraries/interfaces.rb diff --git a/cookbooks/networking/libraries/interfaces.rb b/cookbooks/networking/libraries/interfaces.rb index cd9116dfa..c2f170b9c 100644 --- a/cookbooks/networking/libraries/interfaces.rb +++ b/cookbooks/networking/libraries/interfaces.rb @@ -4,7 +4,7 @@ class Chef interfaces = [] networking = construct_attributes[:networking] || {} - networking_interfaces = networking[:interfaces] || [] + networking_interfaces = networking[:interfaces] || {} networking_interfaces.each_value do |interface| next unless options[:role].nil? || interface[:role].to_s == options[:role].to_s @@ -13,7 +13,7 @@ class Chef if block.nil? interfaces << interface else - block.call(interface) + yield interface end end