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', } On Thursday, November 18, 2010 8:08:20 AM UTC-6, jcbollinger wrote: > > > > On Nov 18, 2:56 am, Daniel Maher <d...@witbe.net> wrote: > > My question is this : what have other Puppet admins done in order to > > ensure that a target machine has the freshest local dbcache before > > attempting to install a package ? > > I set up a cron job (via Puppet) that periodically performs a "yum > clean all". That's a bit crude, and it allows for a delay before a > new package is recognized and installed, but it works well enough for > me. > > > 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/8053d0d8-93de-46eb-836e-a785fdfd5a7a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.