Skip to content

Instantly share code, notes, and snippets.

@phrawzty
Created September 8, 2011 14:03
Show Gist options
  • Save phrawzty/1203472 to your computer and use it in GitHub Desktop.
Save phrawzty/1203472 to your computer and use it in GitHub Desktop.
Quick bash script to validate puppet manifests before committing them. Uses the puppet parser and the puppet-lint gem to do the actual validation. Uses rvm because that's what's sane. :P
#!/bin/bash
OLD=`rvm current`
source "$HOME/.rvm/scripts/rvm"
rvm use 1.8.7
gem list --local
puppet parser validate $1
puppet-lint $1
rvm use $OLD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment