]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/networking/libraries/ipaddresses.rb
Drop mod_php support
[chef.git] / cookbooks / networking / libraries / ipaddresses.rb
index 51ef152b52fab21ee07c891f5ccdfe48886ac6b4..9fde5610be525b6a40bf91d8bb418e13f4e5e347 100644 (file)
@@ -4,10 +4,14 @@ class Chef
       addresses = []
 
       interfaces(options).each do |interface|
+        address = interface[:public_address] || interface[:address]
+
+        next if address.nil?
+
         if block.nil?
-          addresses << interface[:address]
+          addresses << address
         else
-          yield interface[:address]
+          yield address
         end
       end