Skip to content

Instantly share code, notes, and snippets.

@geelen

geelen/chef.rb

Forked from benhoskings/chef.rb
Created Apr 13, 2010
Embed
What would you like to do?
def 'chef installed' do
requires 'chef', 'ohai'
define_var :server_name, :default => shell('hostname -f')
# this needs to go somewhere, like ~/solo.rb
solo_rb = %Q{
file_cache_path "/tmp/chef-solo"
cookbook_path "/tmp/chef-solo/cookbooks"
recipe_url "http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz"
}
# somewhere like ~/chef.json
chef_json = %Q{
{
"bootstrap": {
"chef": {
"url_type": "http",
"init_style": "runit",
"path": "/srv/chef",
"serve_path": "/srv/chef",
"server_fqdn": "#{var :server_name}",
"webui_enabled": true
}
},
"run_list": [ "recipe[bootstrap::server]" ]
}
}
end
gem 'chef'
gem 'ohai'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment