Skip to content

Instantly share code, notes, and snippets.

@botchagalupe
Created June 28, 2011 22:38
Show Gist options
  • Save botchagalupe/1052428 to your computer and use it in GitHub Desktop.
Save botchagalupe/1052428 to your computer and use it in GitHub Desktop.
Chef-Server Install Chef Recipe
include_recipe "apt"

apt_repository "apt.opscode.com" do
  uri "http://apt.opscode.com"
  components ["natty-0.10 main"]
  key "http://apt.opscode.com/packages@opscode.com.gpg.key"
  action :add
end

execute "preseed chef-server" do
  command "debconf-set-selections /var/cache/local/preseeding/chef-server.seed"
  action :nothing
end

template "/var/cache/local/preseeding/chef-server.seed" do
  source "chef-server.seed.erb"
  owner "root"
  group "root"
  mode "0600"
  notifies :run, resources(:execute => "preseed chef-server"), :immediately
end

%w{ chef chef-server }.each do |pkg| package pkg end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment