[chef] Package resource - install multiple packages together?


Chronological Thread 
  • From: Kevin Keane (subscriptions) < >
  • To: < >
  • Subject: [chef] Package resource - install multiple packages together?
  • Date: Thu, 15 Nov 2012 01:49:55 -0800
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=sendgrid.info; h=subject :from:to:mime-version:content-type:sender; q=dns; s=smtpapi; b=S wt01TKqBvMnPaSFhLUyGYRGblq4YAsRkzVOT6jW95QvIVlZ6zk4fvdOrfM1EwBvy sK1b82+9Z65mKOemvSD/w2Ppa6mELKujzm5m8BEnwsAQpOFizQHw1A4bFNv4fRwF w72KlO0o1L4n+SpTpZLqZ5u/T2lFbl7/5FCSTFWYwo=

Title: Package resource - install multiple packages together?

I'm trying to figure out a way to use the package resource to install several packages together, all from files (I'm using CentOS, so the underlying mechanism is yum).

 

The problem I'm having is that a few of the packages have circular dependencies. So I cannot use the trivial approach:

 

packages.each do |pkg|
    package "#{pkg}" do
       action :install
       source "#{dir}/#{dirname}/#{pkg}-*.#{arch}.rpm"
    end
end
 

Is there a way to do something like this instead:

 

package "mypackages" do

   action :install

   source ["#{dir}/#{dirname}/#{pkg1}-*.#{arch}.rpm", "#{dir}/#{dirname}/#{pkg2}-*.#{arch}.rpm" ]
end

Thanks!

 




Archive powered by MHonArc 2.6.16.

§