froethen
froethen

Reputation: 2173

Track configuration changes with Git and Puppet

We use Puppet to manage our Debian servers.

Our procedure is to have the /etc directory managed under Git and track any configuration changes on the servers (e.g. installing packages, adding new users, etc.)

When it comes to Puppet: is there a way to execute a git commit . with a meaningful commit message in /etc directory after Puppet has applied it's changes, preferably after each configuration change?

Does Puppet provide something like a hook to achieve the above?

Upvotes: 0

Views: 580

Answers (1)

Luke Bigum
Luke Bigum

Reputation: 110

Puppet has a configuration parameter postrun_command that you could theoretically run a script to do your git commit after every Puppet run (but not after every resource change as you asked).

However I agree with the other comments that it is a strange idea to mix Git and Puppet for configuration management. The only viable reason I can see for this is that you are using Git as a point-in-time audit trail only. I would recommend you look at Puppet's own Auditing features.

Upvotes: 1

Related Questions