Skip to content

Instantly share code, notes, and snippets.

@logicminds
Created September 26, 2014 16:37
Show Gist options
  • Save logicminds/9d73b1a9cdb8f37f8556 to your computer and use it in GitHub Desktop.
Save logicminds/9d73b1a9cdb8f37f8556 to your computer and use it in GitHub Desktop.
puppet function for troubleshooting
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