[chef] Trying to create links to installed package


Chronological Thread 
  • From: "THARP, JOSHUA L" < >
  • To: " " < >
  • Subject: [chef] Trying to create links to installed package
  • Date: Mon, 21 Oct 2013 13:43:34 +0000
  • Accept-language: en-US

I’m writing a cookbook for a locally-built package served by a local yum server. The installation is straight-forward enough.

 

package “my-package”

 

Now I am creating a second recipe that creates links to the installed package. However, the package installation directory contains the version number of the package. Is there a way to capture either the directory created by the package command or the version of the package installed?

 

My target platform is a Fedora-based Linux so I can use yum_package if that helps solve this issue.

 

My attempts to solve this:

ver = `yum list my-package | grep “my-package” | cut –c 41-55`.strip

ver = `yum info my-package | grep “my-package” | cut –f 3 –d ‘-‘

both return nothing on the first chef-client run (broken links) and return the correct value on the second chef-client run (fixed links). Also neither will work if more than one version of my-package is on the box.

 

Suggestions?

 

Thanks,

 

Josh




Archive powered by MHonArc 2.6.16.

§