Created
September 26, 2014 16:37
-
-
Save logicminds/9d73b1a9cdb8f37f8556 to your computer and use it in GitHub Desktop.
puppet function for troubleshooting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
require 'puppet/parser/functions' | |
module Puppet::Parser::Functions | |
newfunction(:dump_args, :type => :statement,:doc => <<-EOS | |
dump_args - prints the args to STDOUT in Pretty JSON format. | |
Useful for debugging purposes only. | |
EOS | |
) do |args| | |
puts JSON.pretty_generate(args) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment