diff --git a/howto/puppet.md b/howto/puppet.md index 3e4c16cdc7ce72c29670c2da20ce564cb20d5705..88291e581723b4e3c4417146b966c7a0e000dd19 100644 --- a/howto/puppet.md +++ b/howto/puppet.md @@ -365,9 +365,8 @@ manifests. To install those hooks, you should clone this repository: ln -s $PWD/puppet-git-hooks/pre-commit tor-puppet/.git/hooks/pre-commit -A server-side validation hook hasn't been enabled yet because our -manifests would sometimes fail and the hook was found to be somewhat -slow. That is being worked on in [issue 31226][]. +This hook is deployed on the server and *will* refuse your push if it +fails linting, see [issue 31226][] for a discussion. ## Puppet tricks @@ -1558,6 +1557,15 @@ Two bare-mode git repositories live on this server, below hook that deploys to `/etc/puppet/code/environments`. See the "Environments" section below. +The `pre-receive` and `post-receive` hooks are fully managed by +Puppet. Both scripts are basically stubs that use [run-parts(8)](https://manpages.debian.org/bookworm/debianutils/run-parts.8.en.html) to +execute a *series* of hooks in `pre-receive.d` and +`post-receive.d`. This was done because both hooks were getting quite +unwieldy and needlessly complicated. + +The `pre-receive` hook will stop processing if one of the called hooks +fails, but not the `post-receive` hook. + #### External node classifier Before catalog compilation occurs, each node is assigned an environment @@ -1595,7 +1603,7 @@ environment instead of `production`. This is done by editing the Once the environment is not needed anymore, the changes to the ENC should be reverted before the branch is deleted on the control repo using `git push ---delete <branch>`. The git hook will take care of cleaning up the environment +--delete <branch>`. A git hook will take care of cleaning up the environment files under `/etc/puppet/code/environments`. It should be noted that contrary to hiera data and modules, [exported