On Monday, September 29, 2014 2:28:02 PM UTC-5, Sam Coffland wrote:
>
> I came a across this post and like what I see but would off the following 
> addition to Ian's suggestion so that the expire cache  is not executed on 
> every puppet run. 
>
> exec { 'yum-clean-expire-cache':
>           command => '/usr/bin/yum clean expire-cache',
>           refreshonly => true,
> }
> package { ['foobar']: 
>          ensure => present,
>          require => Exec['yum-clean-expire-cache',
> }
>
>

Nope.  At least not by itself.  Marking the Exec with refreshonly => true 
makes it run its command if it receives at least one Event from a modified 
resource (and not otherwise), but nothing shown sends it any events.  
Instead of the Exec running every time, it would *never* run.  I suppose 
the idea was that Package resources would send the events, but

   1. Packages are applied after the Exec, which is too late.
   2. If the Packages were applied before the Exec, then Puppet would use 
   cached data to determine whether they need updated, which is exactly what 
   we want to avoid.



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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/a8379d1d-ef9e-490b-aff0-85a1a3c6528c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to