Peter Meier wrote:
# puppetrun --host abcd --host efgh --tag restart_my_service
It's easy to create a class to restart services but it then get
applied anytime i use puppetrun.
puppet's idea is to ensure that your system is in a certain state, and
if not do anything to achieve this state. However just executing
commands is not really the idea.
If you are looking for something to executes commands on demand on
certain systems have a look at func [1] or mcollective [2].
cheers pete
[1] https://fedorahosted.org/func/
[2] http://code.google.com/p/mcollective/
Yeah, as I was at least partly responsible for Func, I'll say in general
I think you want to *avoid* doing that, if possible, and if there's a
use case where that is required, I want it to be doable through puppet
end-to-end in a puppety way if at all possible. That's not all doable
now, true, but I want to look into it. Other than starting/stopping
services, what would you be looking for? And what are the reasons for
wanting to start/restart the services in those cases?
As Pete wrote, in the current system, you'd have the service subscribe
to the configuration file -- meaning that if the configuration file
changes, Puppet is smart enough to know it should restart the
service.This is the way to go, as you are describing your system in
language, and have a written model of the way it works. Doing things
outside that model doesn't break the model, but it loses the benefits
and power of it a little.
I think that gets a little tricky when you're dealing with events that
span systems, so more data about what kinds of things you are trying to
do like this would be extremely valuable. Let me know!
--Michael
--
You received this message because you are subscribed to the Google Groups "Puppet
Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.