On 08/11/2010 12:27 PM, Marc Zampetti wrote:
I want puppet to normally manage the running state of a service, so that if the service stops, it is restarted, etc. But during maintenance windows, I want puppet to leave the service in whatever state it is in. My idea is to have a file that can be checked to see if the service is in maintenance mode, and if so, then skip the ensure check.

To do this, I see two issues.
1) How do I test for the existence of a file? The docs don't seem to be able to do so. I'm guessing I would need to define a custom fact for that, right? 2) How do make it so that the service "ensure" property is correct? Right now, it appears that only "running" or "notrunning" is valid. Would "ignored" or undef or something like that work?

Is there a better way to achieve what I'm trying to do?

Marc Zampetti

Marc, you might want to look into the schedule resource, and use that.

As for your questions:

1. You would need a custom fact.
2. There are more options for ensure for services, such as enabled, installed, etc. I'm not sure undef would work. If you set a schedule for it though, it shoudl only apply the resource during that schedule.

--
Joe McDonagh
AIM: YoosingYoonickz
IRC: joe-mac on freenode
"When the going gets weird, the weird turn pro."

--
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.

Reply via email to