]> git.openstreetmap.org Git - chef.git/commitdiff
Handle interfaces with no address
authorTom Hughes <tom@compton.nu>
Fri, 29 May 2020 16:32:50 +0000 (17:32 +0100)
committerTom Hughes <tom@compton.nu>
Fri, 29 May 2020 16:32:50 +0000 (17:32 +0100)
cookbooks/networking/libraries/ipaddresses.rb

index d31d885f995076af73eef0d034023e4f5a97cb07..9fde5610be525b6a40bf91d8bb418e13f4e5e347 100644 (file)
@@ -6,6 +6,8 @@ class Chef
       interfaces(options).each do |interface|
         address = interface[:public_address] || interface[:address]
 
       interfaces(options).each do |interface|
         address = interface[:public_address] || interface[:address]
 
+        next if address.nil?
+
         if block.nil?
           addresses << address
         else
         if block.nil?
           addresses << address
         else