The exec and the yumrepo are declared in the same manifest even with declaring the exec before, it doesn't help....
On Thu, Sep 13, 2012 at 3:09 PM, jcbollinger <john.bollin...@stjude.org>wrote: > > > On Thursday, September 13, 2012 4:13:26 AM UTC-5, A_SAAS wrote: >> >> Hi everyone, >> >> >> I trying to notify a cache clean when creating a yumrepository: >> yumrepo { 'XXXXXXX': >> descr => 'XXXXXX Packages', >> baseurl => $url, >> require => [ Yum::Key['0b6f8066'], ], >> gpgcheck => '1', >> enabled => '1', >> notify => [ Exec['YUM Clean cache'], ], >> } >> >> exec { 'YUM Clean cache': >> path => '/bin:/usr/bin:/usr/local/bin'**, >> user => 'root', >> logoutput => true, >> refreshonly => true, >> command => 'yum clean all --verbose', >> } >> >> And I am getting the following error on RedHat 6: >> info: Retrieving plugin >> info: Loading facts in /var/lib/puppet/lib/facter/**root_home.rb >> info: Loading facts in /var/lib/puppet/lib/facter/**puppet_vardir.rb >> info: Loading facts in /var/lib/puppet/lib/facter/**facter_dot_d.rb >> info: Loading facts in /var/lib/puppet/lib/facter/**meminbytes.rb >> err: Could not retrieve catalog from remote server: Error 400 on SERVER: >> Can't synthesize edge: File[/etc/yum.repos.d/XXX.**repo] -notifies- >> Exec[YUM Clean cache] (param notify) >> info: Not using expired catalog for XXXX.fqdn from cache; expired at Wed >> Sep 12 17:03:31 +0200 2012 >> notice: Using cached catalog >> err: Could not retrieve catalog; skipping run >> >> Any idea what could be the problem? >> >> > My first guess would be a parse-order issue. Try moving the declaration > of the Exec before the declaration of the Yumrepo, or if they are in > different classes then make sure the Exec's class is parsed before the > Yumrepo's. My standard way to approach the latter situation would be to > have the Yumrepo's class 'include' the Exec's. > > > John > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/puppet-users/-/aNQO7QnFIngJ. > To post to this group, send email to puppet-users@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. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@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.