Skip to content

Instantly share code, notes, and snippets.

@tinnet
Created June 19, 2013 22:16
Show Gist options
  • Save tinnet/5818633 to your computer and use it in GitHub Desktop.
Save tinnet/5818633 to your computer and use it in GitHub Desktop.
'basic' Vagrantfile
# -*- mode: ruby -*-
# # vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.ssh.forward_agent = true
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", 512]
end
config.vm.network :forwarded_port, guest: 8080, host: 8000, auto_correct: true
# upgrade chef if needed (TODO find a better basebox)
config.vm.provision :shell, :inline => "apt-get -q=2 update && apt-get --assume-yes install build-essential ruby1.9.1-dev"
config.vm.provision :shell, :inline => "gem install chef --version '~> 11' --no-rdoc --no-ri --conservative"
# Cheffile + automatic librarian-chef
# vagrant plugin install vagrant-librarian-chef
#config.librarian_chef.cheffile_dir = "./chef-repo/"
# Enable provisioning with chef solo, specifying a cookbooks path, roles
# path, and data_bags path (all relative to this Vagrantfile), and adding
# some recipes and/or roles.
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = ["./chef-repo/site-cookbooks", "./chef-repo/cookbooks"]
#chef.add_recipe ""
#chef.add_role ""
chef.json = {
}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment