Friday, May 30, 2014

Vagrant, setting multiple IPs on a box

The official doc gives example only for 1 IP:

Vagrant.configure("2") do |config| "private_network", ip: ""

Googling around I could find only 1 example of Multiple IPs:!topic/vagrant-up/hqtdOEjjlsw do |config|
  config.vm.define :web001 do |config| = "base"
    config.vm.forward_port("http", 5000, 8881)
    config.vm.forward_port("ssh", 22, 2222)
    config.vm.host_name = """")"", {:adapter=>2})

but it doesn't work for me...

Any help would be greatly appreciated....

PS the question was answered here just do a:
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| = "precise64" "private_network", ip: "" "private_network", ip: "" "private_network", ip: "" "private_network", ip: ""


I thought I had tried it before and didn't work... but it DOES work! Great!

No comments: