Skip to content

Instantly share code, notes, and snippets.

@geelen
Forked from benhoskings/chef.rb
Created April 13, 2010 01:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geelen/364209 to your computer and use it in GitHub Desktop.
Save geelen/364209 to your computer and use it in GitHub Desktop.
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