Skip to content
Snippets Groups Projects
Unverified Commit 2f3a04a6 authored by Max Adamo's avatar Max Adamo
Browse files

check if keys are empty

parent b37db2a7
No related branches found
No related tags found
No related merge requests found
......@@ -133,6 +133,11 @@ function fw_builder::fw_builder() {
#
['public', 'trust'].each() |$zone| {
if $fw_conf[$zone] {
if $fw_conf[$zone].length() == 0 {
echo { 'WARNING fw_builder':
message => "fw_builder ${zone} key exists but it\'s empty";
}
}
$fw_conf[$zone].each |$name , $conf| {
$ports_spaces = $conf['port'] ? {
Array => join($conf['port'], ' '),
......
......@@ -29,9 +29,6 @@ function fw_builder::fw_builder_public_ips(
$public_ipsets = []
# if public is empty it's seen as empty string
} elsif $facts_fw_conf['public'] =~ String or $facts_fw_conf['public'] =~ Undef {
echo { 'WARNING: fw_builder_public_ips':
message => 'fw_builder public key exists but it\'s empty';
}
$public_ipsets = []
} else {
# if public is present and contains some value
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment