O'Reilly logo

Mastering Puppet 5 by Jason Southgate, Ryan Russell-Yates

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The pdk validate command

The PDK provides pdk validate to check both syntax and style. Syntax checks make sure that your code can compile, and that you're not missing things such as commas or closing braces in manifests or JSON metadata. Syntax checks can also be performed manually on manifests with puppet parser validate. Style checking looks at the code to make sure that it adheres to a standard style guide. Puppet-lint is used to provide style checks to Puppet, and all of the rules can be found at http://puppet-lint.com/. When a module is healthy, the PDK will return check marks against all tasks:

$ pdk validatepdk (INFO): Running all available validators...pdk (INFO): Using Ruby 2.4.4pdk (INFO): Using Puppet 5.5.1[] Checking metadata ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required