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

endure that puppdb is a hash

parent d858673b
No related branches found
No related tags found
No related merge requests found
......@@ -60,9 +60,11 @@ function fw_builder::fw_builder() {
# querying 'puppetDB', if 'puppetdb' is defined
#
if ($fw_conf['custom_ipset'][$name]['puppetdb']) {
$pdb_hash = $fw_conf['custom_ipset'][$name]['puppetdb']
if $pdb_hash !~ Hash { fail("${pdb_hash} must be a hash") }
# check if "env" was defined and it contains proper values
$pdb_filter = join(
$fw_conf['custom_ipset'][$name]['puppetdb'].map |$hash| {
$pdb_hash.map |$hash| {
if $hash['env'] {
# wrong setting for "env" creates an empty fact and breaks puppet on the host
if $hash['env'] !~ Fw_builder::Puppet_environment {
......
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