On Fri, Oct 05, 2012 at 06:42:25PM -0700, Matt wrote:
> Thanks Krzysztof.  It successfully runs now, but output is misleading on 
> subsequent runs:
> 
> build ~]# puppet agent -tv
> Info: Retrieving plugin
> Info: Caching catalog for build
> Info: Applying configuration version '1349482471'
> /Stage[main]/Baseline-testing::Ntpd/Package[ntp]/ensure: ensure changed 
> '4.2.4p8-2.el6' to 'purged'
> Finished catalog run in 6.10 seconds
> build ~]# 
> build ~]# puppet agent -tv
> Info: Retrieving plugin
> Info: Caching catalog for build
> Info: Applying configuration version '1349482471'
> /Stage[main]/Baseline-testing::Ntpd/Package[ntp]/ensure: created
> Finished catalog run in 1.10 seconds
> build ~]#
> build ~]# rpm -q ntp
> package ntp is not installed
> 
> 
> The only class being called for the 'build' node is 
> 'baseline-testing::ntpd', which only ensures that the NTP package is 
> removed (the 8 lines of code you recommended).  It does remove the package, 
> but I don't know why it mentions creating it upon the second run, even 
> though it does not actually get re-installed.  Maybe traditional 'if' 
> statements are advised.
> 
> ~Matt

Can you run puppet agent with the --debug flag? This way you should see
the command puppet is executing.

I guess puppet uses the yum provider (as your package name indicates a
redhat system) and the yum provider does not support "purged" (only
absent). There is an open feature request for it
http://projects.puppetlabs.com/issues/11450

And the issue about running yum erase multiple times is also on redmine
https://projects.puppetlabs.com/issues/2833

-Stefan

-- 
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.

Reply via email to