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


Chronological Thread 
  • From: Sachin Sagar Rai < >
  • To:
  • Subject: [chef] How to write the cookbook for third party ubuntu ppa?
  • Date: Tue, 21 Aug 2012 00:54:47 +0545

Ohai!

I'm trying to write this ppa to install ruby 1.9.3.p-294 from the brightbox ppa at:

ppa:brightbox/ruby-ng

with both way, LWRP and template/execute resource one, neither works.
When I run from the terminal on my ec2 server, it gets installed graciously.
But why the chef-recipe way blows up every time.


# LWRP way
include_recipe "apt"
apt_repository "brightbox-ruby-ng" do
  uri 'ppa:brightbox/ruby-ng'
  distribution node['lsb']['codename']
  components ["main"]
  keyserver "keyserver.ubuntu.com"
  key "C300EE8C"
end
package "ruby" do
  action :install
end

# Template/Execute resource way
template "/etc/apt/sources.list.d/brightbox-ruby-ng-source.list" do
  source "brightbox-ruby-ng-source.list.erb"
  notifies :run, resources(:execute => "apt-get update"), :immediately
end

package "ruby" do
  action :install
end

package "rubygems" do
  action :install
end
# And this is the content of the template file:
deb ppa:brightbox/ruby-ng precise main


Either way shows the same error:

  https://gist.github.com/3406875
  


-------------------------------------------
@millisami
~ Sachin Sagar Rai
Ruby on Rails Developer
http://tfm.com.np
http://nepalonrails.tumblr.com
Sent with Sparrow




Archive powered by MHonArc 2.6.16.

§