Skip to content

Instantly share code, notes, and snippets.

@mb-dev
Created April 25, 2013 02:28
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 mb-dev/5457085 to your computer and use it in GitHub Desktop.
Save mb-dev/5457085 to your computer and use it in GitHub Desktop.
config.vm.box = "quantal64"
VAGRANT_JSON = MultiJson.load(Pathname(__FILE__).dirname.join('nodes', 'localhost.json').read)
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = ["site-cookbooks", "cookbooks"]
chef.roles_path = "roles"
chef.data_bags_path = "data_bags"
chef.provisioning_path = "/tmp/vagrant-chef"
chef.encrypted_data_bag_secret_key_path = "./data_bag_key"
# You may also specify custom JSON attributes:
chef.json = VAGRANT_JSON
VAGRANT_JSON['run_list'].each do |recipe|
chef.add_recipe(recipe)
end if VAGRANT_JSON['run_list']
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment