From: Tom Hughes Date: Fri, 29 May 2020 16:32:50 +0000 (+0100) Subject: Handle interfaces with no address X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/3369f9515111a99387cda562a342f94ea1a13778 Handle interfaces with no address --- diff --git a/cookbooks/networking/libraries/ipaddresses.rb b/cookbooks/networking/libraries/ipaddresses.rb index d31d885f9..9fde5610b 100644 --- a/cookbooks/networking/libraries/ipaddresses.rb +++ b/cookbooks/networking/libraries/ipaddresses.rb @@ -6,6 +6,8 @@ class Chef interfaces(options).each do |interface| address = interface[:public_address] || interface[:address] + next if address.nil? + if block.nil? addresses << address else