• dump - Outputs a dump of the internal parse tree for debugging: SYNOPSIS
puppet parser dump [--e source] [--[no-]validate] [--format old,pn,orjson] [--pretty] [--format
old\|pn\|json] [--pretty] { -e source | [templates ...] }
DESCRIPTION
This action parses and validates the Puppet DSL syntax without compiling a catalog or syncing any
resources.
The output format can be controlled using the --format old|pn|json where:
• 'old' is the default, but now deprecated format which is not API.
• 'pn' is the Puppet Extended S-Expression Notation.
• 'json' outputs the same graph as 'pn' but with JSON syntax.
The output will be "pretty printed" when the option --pretty is given together with --format 'pn' or
'json'. This option has no effect on the 'old' format.
The command accepts one or more manifests (.pp) files, or an -e followed by the puppet source text. If no
arguments are given, the stdin is read (unless it is attached to a terminal)
The output format of the dumped tree is intended for debugging purposes and is not API, it may change
from time to time.
OPTIONS--e<source> - dump one source expression given on the command line.
--format<old,pn,orjson> - Get result in 'old' (deprecated format), 'pn' (new format), or 'json' (new
format in JSON).
--pretty - Pretty print output. Only applicable together with --format pn or json
--[no-]validate - Whether or not to validate the parsed result, if no-validate only syntax errors are
reported
RETURNS
A dump of the resulting AST model unless there are syntax or validation errors.
• validate - Validate the syntax of one or more Puppet manifests.: SYNOPSIS
puppet parser validate [manifest] [manifest ...]
DESCRIPTION
This action validates Puppet DSL syntax without compiling a catalog or syncing any resources. If no
manifest files are provided, it will validate the default site manifest.
When validating multiple issues per file are reported up to the settings of max_error, and
max_warnings. The processing stops after having reported issues for the first encountered file with
errors.
RETURNS
Nothing, or the first syntax error encountered.