.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "PUPPET\-PARSER" "8" "October 2021" "Puppet, Inc." "Puppet manual" . .SH "NAME" \fBpuppet\-parser\fR \- Interact directly with the parser\. . .SH "SYNOPSIS" puppet parser \fIaction\fR . .SH "OPTIONS" 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, \fBserver\fR and \fBrun_mode\fR are valid settings, so you can specify \fB\-\-server \fR, or \fB\-\-run_mode \fR as an argument\. . .P See the configuration file documentation at \fIhttps://puppet\.com/docs/puppet/latest/configuration\.html\fR for the full list of acceptable parameters\. A commented list of all configuration options can also be generated by running puppet with \fB\-\-genconfig\fR\. . .TP \-\-render\-as FORMAT The format in which to render output\. The most common formats are \fBjson\fR, \fBs\fR (string), \fByaml\fR, and \fBconsole\fR, but other options such as \fBdot\fR are sometimes available\. . .TP \-\-verbose Whether to log verbosely\. . .TP \-\-debug Whether to log debug information\. . .SH "ACTIONS" . .IP "\(bu" 4 \fBdump\fR \- Outputs a dump of the internal parse tree for debugging: \fBSYNOPSIS\fR . .IP puppet parser dump [\-\-e \fIsource\fR] [\-\-[no\-]validate] [\-\-format \fIold, pn, or json\fR] [\-\-pretty] [\-\-format \fIold|pn|json\fR] [\-\-pretty] { \-e \fIsource\fR | [\fItemplates\fR \.\.\.] } . .IP \fBDESCRIPTION\fR . .IP This action parses and validates the Puppet DSL syntax without compiling a catalog or syncing any resources\. . .IP The output format can be controlled using the \-\-format \fIold|pn|json\fR where: . .IP "\(bu" 4 \'old\' is the default, but now deprecated format which is not API\. . .IP "\(bu" 4 \'pn\' is the Puppet Extended S\-Expression Notation\. . .IP "\(bu" 4 \'json\' outputs the same graph as \'pn\' but with JSON syntax\. . .IP "" 0 . .IP 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\. . .IP 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) . .IP The output format of the dumped tree is intended for debugging purposes and is not API, it may change from time to time\. . .IP \fBOPTIONS\fR \fI\-\-e \- dump one source expression given on the command line\. . .IP \fI\-\-format \- Get result in \'old\' (deprecated format), \'pn\' (new format), or \'json\' (new format in JSON)\. . .IP \fI\-\-pretty\fR \- Pretty print output\. Only applicable together with \-\-format pn or json . .IP \fI\-\-[no\-]validate\fR \- Whether or not to validate the parsed result, if no\-validate only syntax errors are reported . .IP \fBRETURNS\fR . .IP A dump of the resulting AST model unless there are syntax or validation errors\. . .IP "\(bu" 4 \fBvalidate\fR \- Validate the syntax of one or more Puppet manifests\.: \fBSYNOPSIS\fR . .IP puppet parser validate [\fImanifest\fR] [\fImanifest\fR \.\.\.] . .IP \fBDESCRIPTION\fR . .IP 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\. . .IP 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\. . .IP \fBRETURNS\fR . .IP Nothing, or the first syntax error encountered\. . .IP "" 0 . .SH "EXAMPLES" \fBvalidate\fR . .P Validate the default site manifest at /etc/puppetlabs/puppet/manifests/site\.pp: . .P $ puppet parser validate . .P Validate two arbitrary manifest files: . .P $ puppet parser validate init\.pp vhost\.pp . .P Validate from STDIN: . .P $ cat init\.pp | puppet parser validate . .SH "COPYRIGHT AND LICENSE" Copyright 2014 by Puppet Inc\. Apache 2 license; see COPYING