[chef] Re: Re: Installing package on debian


Chronological Thread 
  • From: Geoff Meakin < >
  • To:
  • Subject: [chef] Re: Re: Installing package on debian
  • Date: Sun, 25 Mar 2012 10:34:11 +0100

It still demands interactivity from STDIN that the particular phrase is typed: "Yes, do as I say!" (It's a weird apt thing for packages marked essential)

I guess I'll have to use a bash resource instead, I just wondered if package could do it to make it distro independent.

Cheers
Geoff

On 24 Mar 2012, at 21:33, Joshua Miller wrote:

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.

§