[chef] Checking for the existance of a package


Chronological Thread 
  • From: Sölvi Páll Ásgeirsson < >
  • To:
  • Subject: [chef] Checking for the existance of a package
  • Date: Wed, 13 Feb 2013 22:14:40 +0000

Hello,

I'm new with Chef(and ruby), please excuse me if I'm just being thick.

I'm using the windows_feature provider from the windows cookbook to
install roles on a Windows 2012 server.
On W2012 however, you cannot install .Net framework 3.5 without
providing some installation sources.
So far, I work around that by using remote_directory and by shelling
out to cmd, something like:
https://gist.github.com/solvip/c07e032ff7858aa53932
I'd like to skip the remote_directory copy when the feature has been
installed, however, so my question is:

Is there no way to simply check if some feature/package is installed?
The provider implements the method 'installed?'.  Can I not call it
somehow from my recipes?

Thanks alot!

regards,
Sölvi Páll Á.



Archive powered by MHonArc 2.6.16.

§