[chef] Re: Installing package on debian


Chronological Thread 
  • From: Joshua Miller < >
  • To: " " < >
  • Cc: " " < >
  • Subject: [chef] Re: Installing package on debian
  • Date: Sat, 24 Mar 2012 14:33:31 -0700

You could wrap the "options" attribute in a case statement?


http://wiki.opscode.com/display/chef/Resources#Resources-Package


Install Package with options
package "debian-archive-keyring" do
  action :install
  options "--force-yes"
end

On Mar 24, 2012, at 2:13 PM, Geoff Meakin < "> > wrote:

Hi all, I am on debian

doing:

package "foo" do
 action :install
end

works fine in most cases.

Some packages however (I read somewhere there are 8 of them?) seem to be critical/core packages and trying to uninstall them mean that the normal way of installing under the covers:
 apt-get -y

just doesnt work.  upstart is such a package as it uninstalls sysvinit.

Is there a standard way of automatically installing this using chef?


If I had to do a commandline version I would do this:

yes "Yes, do as I say!" | apt-get -y --force-yes upstart

But then this deviates somewhat from the nicely distribution-agnostic package chef dsl


Thanks




Archive powered by MHonArc 2.6.16.

§