]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/networking/libraries/interfaces.rb
Configure prometheus monitoring for mysql
[chef.git] / cookbooks / networking / libraries / interfaces.rb
index cd9116dfa8be051956ef6550332e4dc1dbdb10f1..c2f170b9c73a2f56c290d0a0f3cc38110c563eae 100644 (file)
@@ -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