]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/networking/libraries/ipaddresses.rb
Disable Wikibase custom searchbox
[chef.git] / cookbooks / networking / libraries / ipaddresses.rb
index 51ef152b52fab21ee07c891f5ccdfe48886ac6b4..d31d885f995076af73eef0d034023e4f5a97cb07 100644 (file)
@@ -4,10 +4,12 @@ class Chef
       addresses = []
 
       interfaces(options).each do |interface|
       addresses = []
 
       interfaces(options).each do |interface|
+        address = interface[:public_address] || interface[:address]
+
         if block.nil?
         if block.nil?
-          addresses << interface[:address]
+          addresses << address
         else
         else
-          yield interface[:address]
+          yield address
         end
       end
 
         end
       end