From 3369f9515111a99387cda562a342f94ea1a13778 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 29 May 2020 17:32:50 +0100 Subject: [PATCH] Handle interfaces with no address --- cookbooks/networking/libraries/ipaddresses.rb | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.45.1