Skip to content

Commit

Permalink
Merge pull request #406 from Icinga/bug/Boolean-false-does-not-appear…
Browse files Browse the repository at this point in the history
…-in-config-400

fix #400 boolean false custom variables do not appear in configuration
  • Loading branch information
lbetz authored Nov 19, 2017
2 parents 4a67dfb + 169aa37 commit daedfba
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/puppet_x/icinga2/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,14 @@ def self.process_hash(attrs, indent=2, level=3, prefix=' '*indent)
else
if level > 1
if level == 3
result += "%s%s = %s\n" % [ prefix, attribute_types(attr), parse(value) ] if value
result += "%s%s = %s\n" % [ prefix, attribute_types(attr), parse(value) ] if value != :nil
#result += "%s%s = %s\n" % [ prefix, attr, parse(value) ] if value != :nil
else
result += "%s[\"%s\"] = %s\n" % [ prefix, attribute_types(attr), parse(value) ] if value
result += "%s[\"%s\"] = %s\n" % [ prefix, attribute_types(attr), parse(value) ] if value != :nil
#result += "%s[\"%s\"] = %s\n" % [ prefix, attr, parse(value) ] if value != :nil
end
else
result += "%s%s = %s\n" % [ prefix, attr, parse(value) ] if value
result += "%s%s = %s\n" % [ prefix, attr, parse(value) ] if value != :nil
end
end
end
Expand Down

0 comments on commit daedfba

Please sign in to comment.