Skip to content

Instantly share code, notes, and snippets.

@mrkcor
Created April 3, 2013 18:50
Show Gist options
  • Save mrkcor/5304090 to your computer and use it in GitHub Desktop.
Save mrkcor/5304090 to your computer and use it in GitHub Desktop.
Vagrant files
Vagrant.configure("2") do |config|
# Enable SSH agent forwarding, by running the ensure_ssh_auth_sock script on its own the following scripts have their environment setup properly
config.ssh.forward_agent = true
config.vm.provision :shell, :path => File.join(File.dirname(__FILE__), "scripts", "ensure_ssh_auth_sock")
# Grab my dotfiles and set them up
config.vm.synced_folder File.expand_path("~/.dotfiles"), "/home/vagrant/.dotfiles"
config.vm.provision :shell, :path => File.join(File.dirname(__FILE__), "scripts", "mkremer")
end
Vagrant.configure("2") do |config|
config.vm.hostname = "myhostname"
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.network :private_network, ip: "192.168.33.50"
config.vm.provider :virtualbox do |vbox|
vbox.customize ["modifyvm", :id, "--memory", 512]
end
config.vm.synced_folder ".", "/vagrant", :nfs => !(ENV["OS"] =~ /windows/i)
if File.directory?(File.expand_path("./.apt-cache/partial/"))
config.vm.synced_folder ".apt-cache", "/var/cache/apt/archives", owner: "root", group: "root"
end
config.vm.provision :shell, :path => "script/vagrant-keep-agent-forwarding"
config.vm.provision :shell, :path => "script/vagrant-provision"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment