Skip to content

Instantly share code, notes, and snippets.

@mitchellh
Created January 12, 2013 00:30
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mitchellh/4515231 to your computer and use it in GitHub Desktop.
Save mitchellh/4515231 to your computer and use it in GitHub Desktop.
# This is just a sample of what the new networking syntax in
# Vagrant 1.1 can look like.
Vagrant.configure("2") do |config|
# ...
# High-level configurations that are portable across providers.
# Providers do a "best effort" to satisfy these. If they can't,
# they should warn and still try to come up.
config.vm.network :forwarded_port, 80, 8080
config.vm.network :private_network, "10.33.33.33"
# More advanced low-level configuration. You don't HAVE to do
# this, but if you WANT to, you can.
config.vm.provider :virtualbox do |vb|
vb.network_adapter 2, :hostonly, "10.44.44.44"
vb.network_adapter 5, :nat
end
# Example of what another provider might expose...
config.vm.provider :aws do |aws|
aws.routing_table = "r-1234567890"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment