This code has moved to gitlab. Please see https://gitlab.com/puppet-debugger/puppet-debugger
Table of Contents generated with DocToc
A interactive command line tool for evaluating and debugging the puppet language.
Please visit https://docs.puppet-debugger.com for more info.
Requires Puppet 5.5+, ruby 2.4+
The puppet debugger is a developer tool that should only be used when writing puppet code. Although it might seem useful to install on your production puppet master. Please do not install because of the puppet-debugger gem dependencies that might conflict with your existing environment.
gem install puppet-debugger
There is a web version of the puppet-debugger online but is somewhat limited at this time. In the future we will be adding lots of awesome features to the web debugger.
The puppet debugger is a puppet application so once you install the gem, just fire it up using puppet debugger
.
If you have used puppet apply
to evaulate puppet code, this replaces all of that with a simple debugger REPL console.
The debugger will only parse and evaluate your code. It will not build a catalog
and try to enforce the catalog. This has a few side affects. This means you can type any puppet code in the debugger
and see what it would actual do when compiling a resource.
- Type and provider code will not get run.
- Nothing is created or destroyed on your system.
puppet debugger
Example Usage
Ruby Version: 2.6.5
Puppet Version: 6.17.0
Puppet Debugger Version: 1.0.0
Created by: NWOps <[email protected]>
Type "commands" for a list of debugger commands
or "help" to show the help screen.
1:>> $os
=> {
"architecture" => "x86_64",
"family" => "RedHat",
"hardware" => "x86_64",
"name" => "Fedora",
"release" => {
"full" => "23",
"major" => "23"
},
"selinux" => {
"config_mode" => "permissive",
"config_policy" => "targeted",
"current_mode" => "permissive",
"enabled" => true,
"enforced" => false,
"policy_version" => "29"
}
}
2:>>
Copyright (c) 2018 NWOPS, LLC. See LICENSE.txt for further details.