Hi
> I'm trying to have a exec dependency on a service object that would keep
> it from being restarted if the exec fails. Unfortunately, the service
> gets refreshed regardless whenever the exec is run, failure or not.
>
> I've tried various combinations of subscribe/require/notify, but can't
> find an elegant way to not restart the service when the dependency
> fails. I must be missing something obvious.
>
> We have a few needs for this model, here's a (simplified) example of one:
>
> [...]
> exec { "check-dhcpd-conf":
> command => "/usr/sbin/dhcpd3 -t 2>&1",
> refreshonly => true,
> subscribe => [ File["/etc/dhcp3/dhcpd.conf"], File["/etc/dhcp3"] ];
> }
> [...]
>
> Ideas?
don't set the command to refreshonly. this will trigger the exec only if
it get triggered by someone else otherwise the resource counts as
successful.
cheers pete
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---