O'Reilly logo

Troubleshooting Puppet by Thomas Uphill

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

Git hooks

Hooks are scripts run by Git. Git will run hook scripts based on the situation or the stage of deployment. There are several hooks that are run at different stages of the deployment of code. We are interested in the pre-commit hook—this hook is run before a commit is committed to the repository. There are several good examples for pre-commit hooks available. The Puppet Labs suggested hook runs puppet parser validate against all the files ending in the .pp extension. The script can be found at http://projects.puppetlabs.com/projects/1/wiki/puppet_version_control, the website of Puppet Labs. Copy the script from the page into the .git/hooks directory of your Git repository. The file should be named pre-commit and have the executable permissions ...

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