[chef] RE: possible to pass options to yum on package install


Chronological Thread 
  • From: Kevin Keane Subscription < >
  • To: < >
  • Subject: [chef] RE: possible to pass options to yum on package install
  • Date: Wed, 27 Mar 2013 18:07:46 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=sendgrid.info; h=subject :from:to:mime-version:content-type:in-reply-to:references :sender; q=dns; s=smtpapi; b=HJ58JMYznLhfyQOxMxD7uipYDrkEnWY2MJr CumSGvyuORE6fRoLkAJCV8Yw7HVvfK85ajJZC8AX19zk57RUrB0uO8k8zDWlLW0s mKe342cxqzhny9Y1N7RhlGnd8pV9ExqZt+Ved2ZQXklyisQz8wIF1MYIV9SIOuyL kKQYBRf4=

I’ve had a similar situation where I needed *one* package out of repoforge, but it created dependency hell everywhere else. My solution was to create my own local repository (and I’m using a chef cookbook to set up this repository). For me, it particularly made sense because I also have a couple RPMs that I need but aren’t in available in any public repo at all.

 

I haven’t yet figured out a way to keep these RPMs updated automatically, though.

 

From: Jeremy Koerber [mailto:
Sent: Wednesday, March 27, 2013 2:39 PM
To:
Subject: [chef] possible to pass options to yum on package install

 

Hi,

I have this in a recipe:

package "tomcat7" do
  action :install
  options "--enablerepo=amzn-main"
end

but the options are not being passed to yum and the package fails to install because it isn't found in my regular yum repos that are enabled by default. I can't enable the amzn-main repo by default because then the system starts using it for everything, and I end up with some messy dependency conflicts. Plus, I strongly prefer to just use the CentOS-Base repo wherever possible.

So.. Looking at http://docs.opscode.com/resource_package.html and I see:
options Additional options that are added to the underlying package command. Can be used with APT, dpkg, Gentoo, RPM Package Manager, and RubyGems. Default value: nil.

 

So that would explain why Yum isn't getting the options passed to it. So my questions are: is there a way to do this, and why can't chef pass options to yum just like APT?

Thanks much for any help..

 

Jeremy




Archive powered by MHonArc 2.6.16.

§