Skip to content

Instantly share code, notes, and snippets.

@artistio
Forked from hgilani/Vagrant.chef.rb
Last active September 29, 2015 03:06
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 artistio/997fbf8b5fd3b904d0f2 to your computer and use it in GitHub Desktop.
Save artistio/997fbf8b5fd3b904d0f2 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 = "ubuntu/trusty32"
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment