]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/networking/libraries/ipaddresses.rb
Use ruby 2.3 on Ubuntu 16.04 database servers
[chef.git] / cookbooks / networking / libraries / ipaddresses.rb
index 811c81884387cbcd02cb7a5382bb123ccf35a93c..51ef152b52fab21ee07c891f5ccdfe48886ac6b4 100644 (file)
@@ -7,7 +7,7 @@ class Chef
         if block.nil?
           addresses << interface[:address]
         else
-          block.call(interface[:address])
+          yield interface[:address]
         end
       end
 
@@ -15,11 +15,11 @@ class Chef
     end
 
     def internal_ipaddress
-      return ipaddresses(:role => :internal).first
+      ipaddresses(:role => :internal).first
     end
 
     def external_ipaddress
-      return ipaddresses(:role => :external).first
+      ipaddresses(:role => :external).first
     end
   end
 end