puppet parser Man Page

Included in Puppet Enterprise 3.3. A newer version is available; see the version menu above for details.


puppet-parser - Interact directly with the parser.


puppet parser action


Note that any setting that's valid in the configuration file is also a valid long argument, although it may or may not be relevant to the present action. For example, server and run_mode are valid settings, so you can specify --server <servername>, or --run_mode <runmode> as an argument.

See the configuration file documentation at http://docs.puppetlabs.com/puppet/latest/reference/configuration.html for the full list of acceptable parameters. A commented list of all configuration options can also be generated by running puppet with --genconfig.

--render-as FORMAT
The format in which to render output. The most common formats are json, s (string), yaml, and console, but other options such as dot are sometimes available.
Whether to log verbosely.
Whether to log debug information.


validate - Validate the syntax of one or more Puppet manifests.


puppet parser validate [manifest] [manifest ...]


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 with --parser current, the validation stops after the first encountered issue.

When validating with --parser future, 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.


Nothing, or the first syntax error encountered.



Validate the default site manifest at /etc/puppet/manifests/site.pp:

$ puppet parser validate

Validate two arbitrary manifest files:

$ puppet parser validate init.pp vhost.pp

Validate from STDIN:

$ cat init.pp | puppet parser validate

Copyright 2011 by Puppet Labs Apache 2 license; see COPYING

↑ Back to top