From 4f62659337eec7bce28608a9ec5929dc689a3fa6 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sat, 18 Mar 2023 11:43:55 +0000 Subject: [PATCH 1/1] Coerce addresses to strings --- cookbooks/networking/resources/firewall_rule.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbooks/networking/resources/firewall_rule.rb b/cookbooks/networking/resources/firewall_rule.rb index 7d7d45b7a..22bde6ca9 100644 --- a/cookbooks/networking/resources/firewall_rule.rb +++ b/cookbooks/networking/resources/firewall_rule.rb @@ -118,9 +118,9 @@ action_class do addresses else Array(addresses).map do |address| - if ip == "ip" && IPAddr.new(address).ipv4? + if ip == "ip" && IPAddr.new(address.to_s).ipv4? address - elsif ip == "ip6" && IPAddr.new(address).ipv6? + elsif ip == "ip6" && IPAddr.new(address.to_s).ipv6? address end end.compact -- 2.39.5