Skip to content

Instantly share code, notes, and snippets.

@toddlers
Created February 10, 2014 11:04
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 toddlers/8913997 to your computer and use it in GitHub Desktop.
Save toddlers/8913997 to your computer and use it in GitHub Desktop.
Vagrant file for testing
homebase = "/path/to/homebase"
Vagrant::Config.run do |config|
config.vm.box = "opscode-ubuntu-12.04-chef11"
config.vm.box_url = "https://opscode-vm.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_chef-11.2.0.box" # from https://github.com/opscode/bento
config.vm.network :hostonly, "10.111.222.33"
config.vm.customize ["modifyvm", :id, "--memory", 2048]
config.vm.provision :chef_solo do |chef|
# chef.log_level = :debug
chef.cookbooks_path = "#{homebase}/cookbooks"
chef.data_bags_path = "#{homebase}/data_bags"
chef.roles_path = "#{homebase}/roles"
# Replace the following lines with your roles/recipes
chef.add_recipe "apt::default"
#chef.add_recipe "foo::bar"
# How to add a role:
# chef.add_role "foo"
# How to set node attributes (like an environment)
chef.json = {
:load_limit => 42,
:chunky_bacon => true
}
end
end
VAGRANTFILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment