[chef] Re: Re: Re: query if the package already installed


Chronological Thread 
  • From: AJ Christensen < >
  • To:
  • Subject: [chef] Re: Re: Re: query if the package already installed
  • Date: Wed, 7 Jul 2010 08:26:03 +1200

There was a ticket I opened some moons ago regarding caching the list of installed/available packages to node/ohai data. May be relevant to this discussion.

case has_package? :provider, 'foo' or similar.

Regards,

AJ

On 7 July 2010 06:20, Andrew Shafer < "> > wrote:

I think he's asking a different question.

Vasiliy wants to conditionally do something based on packages being installed.

My opinionated answer is, you should not think about the problem this way.

You should specify that a package is installed or it is not, then do the appropriate things.

If you wanted to add functionality that would report installed packages, in my opinion, the appropriate place is probably ohai.

Then you could do whatever logic in the recipes.



On Tue, Jul 6, 2010 at 11:56 AM, Alex Soto < " target="_blank"> > wrote:
If you use the package resource it should be automatic.

On Jul 6, 2010, at 5:09 AM, Vasiliy G Tolstov wrote:

> I need to do specific actions in recipe if the some packages are
> installed. How can i check this automatic? Or i need to write some code
> (bash ...) ? Does chef Package resource provide query for installed
> packages ?
>
>
> --
> Vasiliy G Tolstov < " target="_blank"> >
> Selfip.Ru
>






Archive powered by MHonArc 2.6.16.

§