Ask Your Question
0

Programatically determine when Puppet completes making changes

asked 2015-09-17 10:53:33 -0500

updated 2015-09-17 14:46:32 -0500

Since puppet is an agent/pull based model, is there a way to determine whether or not Puppet has completed all of its changes before allowing users to use the machine, or trigger a workflow to complete another task?

I know that PE reports that the node reports no changes when it completes its provisioning/configuration, but I was looking to see if there was a way to trigger another job once a managed node reports 'complete' for the first time.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-09-17 22:37:13 -0500

Ancillas gravatar image

Nothing baked into Puppet, but you could build this yourself.

The general idea is that the very last step of your Puppet code sends some kind of API call (or however else you want to trigger the next step of your automation), and then creates a checkpoint file so that the final step never occurs again.

This way, you can have your servers report in at the end of their runs, without having to poll PuppetDB or the CA's certs.

A simple exec should do the trick, with a creates parameter set to the path of the checkpoint file that your script would create. parameterize the script path if you need it to work on Linux and Windows.

Would that do the trick?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-09-17 10:53:33 -0500

Seen: 41 times

Last updated: Sep 17 '15