Last Updated: February 25, 2016
· mcappadonna

Validate puppet code and erb templates

Before commit on your favorites versioning server, you MUST check for common syntax error on your puppet code (.pp files) and on your puppet template (.erb files).

You can do easly by launching this commands on your modified files:

# puppet parser validate manifests/changedcode.pp


# erb -x -T '-' templates/changedtemplate.erb | ruby -c

You must launch those commands from your module directory.

In the next days I'll show you a way to automatize this operations before the commit.