puppetlabs/Razor — pull request #456 by calebcase (2013-04-15 22:14:17+00:00)
Title: Script Broker: Pre and Post Server-side Hooks

This adds support for optional server-side pre and post scripts. These
scripts will be passed the active model uuid as their only argument.
They are useful for taking actions on ther server which might otherwise
require providing additional access on the client.

A scenario using the script broker with a puppetmaster might do the
following:

pre-script

- Generate client SSL cert.
- Register that cert with the puppetmaster.
- Package up the client's SSL cert and the public puppetmaster cert.

client-script

- Install the client cert and puppetmaster cert.
- Start the puppet client.

post-script

- Update a legacy inventory service with the new node.

Benefits of this, rather than a client-only script, is that the trust
relationship is between the razor server itself. Only the razor server
needs to have access to the puppetmaster's SSL database or the legacy
inventory service. It also alleviates issues with client connectivity to
services that are only accessible from the razor server.