Skip to content

Instantly share code, notes, and snippets.

@mitchellh
Created January 12, 2013 00:30
Show Gist options
  • Select an option

  • Save mitchellh/4515231 to your computer and use it in GitHub Desktop.

Select an option

Save mitchellh/4515231 to your computer and use it in GitHub Desktop.

Revisions

  1. mitchellh created this gist Jan 12, 2013.
    24 changes: 24 additions & 0 deletions gistfile1.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    # 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