Vagrant.configure("2") do |config|
    
    config.ssh.insert_key = false
    config.ssh.private_key_path = ["keys/.ssh/id_rsa", "~/.vagrant.d/insecure_private_key"]
    config.vm.provision "file", source: "keys/.ssh/id_rsa.pub", destination: "~/.ssh/authorized_keys"
    
    config.vm.define "controlpane" do |controlpane|
        controlpane.vm.box = "bento/ubuntu-16.04"

        controlpane.vm.network "public_network", ip: "192.168.100.103",  bridge: "en0: Wi-Fi (AirPort)"
        controlpane.vm.network "private_network", ip: "192.168.50.4"
    end
    
    config.vm.define "web" do |web|
      web.vm.box = "bento/ubuntu-16.04"

      web.vm.network "public_network", ip: "192.168.100.104", bridge: "en0: Wi-Fi (AirPort)"
      web.vm.network "private_network", ip: "192.168.50.5"
    end
  
    config.vm.define "db" do |db|
      db.vm.box = "bento/ubuntu-16.04"

      db.vm.network "public_network", ip: "192.168.100.105", bridge: "en0: Wi-Fi (AirPort)"
      db.vm.network "private_network", ip: "192.168.50.6"
    end
  end
Share this article: Link copied to clipboard!