Skip to content

Instantly share code, notes, and snippets.

@hgilani
Last active December 28, 2015 02:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hgilani/7426779 to your computer and use it in GitHub Desktop.
Save hgilani/7426779 to your computer and use it in GitHub Desktop.
Vagrant VM running with latest version of chef and ruby
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.omnibus.chef_version = :latest
config.vm.provision :chef_solo do |chef|
chef.log_level = :debug
chef.cookbooks_path = "~/Dropbox/chef/cookbooks"
chef.add_recipe ("apt")
chef.add_recipe ("git")
chef.add_recipe "build-essential"
chef.add_recipe "ruby_build"
chef.add_recipe "rbenv::vagrant"
chef.add_recipe "rbenv::user"
chef.json = {
'rbenv' => {
'user_installs' => [
{
'user' => 'vagrant',
'rubies' => ['2.0.0-p247'],
'global' => '2.0.0-p247',
'gems' => {
'2.0.0-p247' => [
{ 'name' => 'bundler' },
{ 'name' => 'rails' },
{ 'name' => 'haml' }
]
}
}
]
}
}
end
end
@hgilani
Copy link
Author

hgilani commented Nov 12, 2013

Note: For vagrant command config.omnibus.chef_version = :latest to install the vagrant omnibus plugin be executing vagrant plugin install vagrant-omnibus

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