[chef] Re: Re: Re: Re: Re: How to write the cookbook for third party ubuntu ppa?


Chronological Thread 
  • From: Ringo De Smet < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: Re: How to write the cookbook for third party ubuntu ppa?
  • Date: Wed, 29 Aug 2012 08:23:26 +0200

Sachin,

On 28 August 2012 18:31, Sachin Sagar Rai < " target="_blank"> > wrote:
Hi Ringo,
Due to many trials, couldn't get that working. So, just went the old school way with `execute ...` resource.

But I'd like to do it the LWRP way. Can you also post your `apt_repository ....` block code as well!

I'd appreciate that.

My apt_repository block looks similar to yours, only pointing to the Mercurial PPA:

--- BEGIN ---
# add the Mercurial PPA; grab key from keyserver
apt_repository "mercurial-ppa" do
  uri "http://ppa.launchpad.net/mercurial-ppa/releases/ubuntu"
  distribution node['lsb']['codename']
  components ["main"]
  keyserver "keyserver.ubuntu.com"
  key "323293EE"
  action :add
end

execute "apt-get update" do
  action :run
end
--- END --- 

I do have to note though that this piece of code works for me with an older version of the apt cookbook. I haven't really tested with the latest version including that apt update timestamp functionality.

Hope this helps.

Ringo



Archive powered by MHonArc 2.6.16.

§