From ec2f865d91ea281693fc5a91a98b36a62fd0ddce Mon Sep 17 00:00:00 2001 From: Massimiliano Adamo <maxadamo@gmail.com> Date: Wed, 18 Jan 2023 12:55:58 +0100 Subject: [PATCH] fix empty hash check --- functions/fw_builder_public_ips.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/fw_builder_public_ips.pp b/functions/fw_builder_public_ips.pp index 887b9e6..8dc7a84 100644 --- a/functions/fw_builder_public_ips.pp +++ b/functions/fw_builder_public_ips.pp @@ -38,8 +38,8 @@ function fw_builder::fw_builder_public_ips( $facts_fw_conf_public = $facts_fw_conf['public'] # fail on empty hash - if $facts_fw_conf_public.length == 0 { - fail('public is declared but it is empty. Please either delete it or add proper values') + if $facts_fw_conf_public.length =~ Undef { + fail('public is declared but it\'s empty. Please either delete it or add proper values') } # create a list of lists with all the ipsets in public -- GitLab