On Thursday, July 24, 2014 10:42:34 AM UTC-5, Dimitris Stafylarakis wrote: > > Hi all, > > I have a question for the experts in the group: > > say there's an exec resource dependent on some other resource and > refreshonly=> true. As we know already, a change in the dependent resource > will send a refresh event to the exec resource. This will however be > scheduled for AFTER the change in the dependent resource (e.g. change a > configuration file for apache and then reload the service). I'd like to > know if it's possible to schedule the exec resource BEFORE the change (e.g. > run apt-get update before upgrading a package). >
No, it's not logically consistent. If you want a resource A to be refreshed in the event that a different resource, B, is changed, then Puppet needs to sync B before it knows whether to refresh A. Under some circumstances you can use Exec's 'onlyif' and/or 'unless' parameter instead of 'refreshonly' and events. Alternatively, you may be able to use custom facts to help predict whether a specific resource will be updated. Details may depend on exactly what you're trying to do. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/ed82b7e7-cf99-4680-93d6-7c73b253f10b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
