Quickly validate puppet manifests in a git repo.

Mon 17 September 2012 by Thomas Van Doren

I have been bitten on more than one occasion with a forgotten curly brace or missing comma in a puppet manifest. So, I wrote a little git post-commit script that will validate all manifests in a repo. I have tested it on a repo with ~60 modules and ~400 manifests, and it only adds a little bit of latency to committing (less than 1s on my system with the email disabled).

I still like to use continuous integration via Travis or Jenkins to run smoke tests, spec tests, and lint. This post-commit commit script just provides some quick feedback for syntax errors.