Why does puppet return an error when a package is already installed?

I use ensure => installed to make sure that a package is installed, and 
then have a file that is dependent on that package. When the manifest is 
applied and the package is already installed, it reports an error and then 
doesn't do anything with the file.  Isn't this a bug? The package type is 
just supposed to ensure that the package is installed. If it sees that it 
is already installed, that should be a good thing, not an error. 

On Monday, February 14, 2011 8:13:36 AM UTC-6, jcbollinger wrote:
>
>
>
> On Feb 14, 2:35 am, Jan <[email protected]> wrote: 
> > Hi *, 
> > 
> > no more ideas? :) 
>
> Whenever you want to use information about the state of a node to 
> influence the catalog supplied to that node, the Puppet Way is to use 
> facts.  In this case, it would need to be a custom fact.  It wouldn't 
> be too hard to wrap a custom fact around `rpm -q puppet`, or even to 
> draw a bunch of custom facts out of `rpm -qa`. 
>
> HOWEVER, I have to second Patrick's recommendation to create a local 
> repository.  Even a temporary one could solve the immediate problem 
> until your major problems (whatever they are) are sorted.  A yum 
> repository, at least, is very easy to create, and very easy to 
> advertise to all your clients via Puppet.  You could set it up on your 
> Puppetmaster, where evidently you already have copies of all the RPMs 
> you want to distribute, and which all your clients can already reach 
> over the network. 
>
> Alternatively, you could abandon your Package resources in favor of 
> Execs of the form "yum localinstall -y <RPM package>".  That gets you 
> out of creating either a repository or any custom facts, but it is 
> furthest from the Way, and the most disruptive to your current 
> manifests. 
>
>
> Good Luck, 
>
> 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/-/7B76F9qD4fEJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to