From: Tom Hughes Date: Sat, 18 Mar 2023 11:43:55 +0000 (+0000) Subject: Coerce addresses to strings X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/4f62659337eec7bce28608a9ec5929dc689a3fa6?hp=5cfe9e5b6dd08d90d025e627c9859f12c3ef6c69 Coerce addresses to strings --- 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