deploying class *only* via puppet kick

121 views
Skip to first unread message

Miles Stevenson

unread,
May 8, 2012, 5:39:54 PM5/8/12
to puppet...@googlegroups.com
I'm trying to set up a system in which the web devs can deploy new websites via puppet kick. I'm not having a problem with puppet kick itself, but rather figuring out how to make my "webserver::sitelist" class *only* get deployed via puppet kick, and not have it regularly evaluated in the nodes.pp file. I don't want webserver::sitelist to ever get automatically run by the puppet daemon. I only want that manually run via puppet kick. 

Here's my puppet kick command:
sudo puppet kick --tag webserver::sitelist --host webserver.example.com

This works fine as long as "include webserver::sitelist" is in the nodes.pp file for webserver.example.com. But I don't want it to be in the nodes file and get evaluated every 30 minutes. When I comment out that include line, the puppet kick command above doesn't run the webserver::sitelist. It just exits successfully without doing anything.

What's the recommended way to do this?

Miles Stevenson

unread,
May 11, 2012, 12:29:21 PM5/11/12
to puppet...@googlegroups.com
I thought the answer to this would be tagging. User a conditional and a tag such that a class is only included if a tag has been set. The problem is that the tags that you specify with puppet-kick do not get evaluated when the node manifests are running. There is a low priority feature request to add this functionality.

So does this mean I'm boned? It seems odd that there is no way to have some portions of a manifest applied automatically and other portions only applied manually when you "kick" them. 

Will I need to resort to something as lame as a shell-script wrapper that uses sed to add the class to the nodes files, kick the server, and then remove the class from the nodes file again?
Reply all
Reply to author
Forward
0 new messages