Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

the deb packages prompt so this may not work

  • Loading branch information...
commit 21eebfd4d4e1ecc9cd30e19e8614f7142753be6b 1 parent 7e25170
@EntropyWorks authored
Showing with 19 additions and 1 deletion.
  1. +19 −1 servers/default.rb
View
20 servers/default.rb
@@ -61,4 +61,22 @@
run "sudo cp #{user_home_dir}/cap-files/etc/init.d/chef-server-webui /etc/init.d/chef-server-webui"
run "sudo cp #{user_home_dir}/cap-files/etc/init.d/chef-solr /etc/init.d/chef-solr"
end
-end
+end
+
+namespace :ubuntu do
+ desc "Install chef ubuntu packages"
+ task :chef, :roles=> :c_client do
+ run "echo \"deb http://apt.opscode.com/ `lsb_release -cs`-0.10 main\" > /tmp/opscode.list"
+ run "#{sudo} cp /tmp/opscode.list /etc/apt/sources.list.d"
+ run "mkdir -p #{user_home_dir}/cap-files/etc/chef"
+ run "wget -qO - http://apt.opscode.com/packages@opscode.com.gpg.key | sudo apt-key add - "
+ template = File.read(File.join(File.dirname(__FILE__), "./files/etc/chef/server.rb.erb"))
+ buffer = ERB.new(template).result(binding)
+ put buffer, "#{user_home_dir}/cap-files/etc/chef/server.rb"
+ run "#{sudo} mkdir -p /etc/chef"
+ run "#{sudo} cp #{user_home_dir}/cap-files/etc/chef/server.rb /etc/chef/server.rb"
+ run "#{sudo} apt-get update"
+ run "#{sudo} apt-get -y upgrade"
+ run "#{sudo} apt-get -y install chef"
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.