$script2 = <<SCRIPT echo "auto enp0s8 iface enp0s8 inet manual" >> /etc/network/interfaces ifconfig enp0s8 down ifconfig enp0s8 up SCRIPT
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # Use the same key for each machine #config.ssh.insert_key = false config.vm.provision "file", source: "/root/.ssh/id_rsa.pub", destination: "/tmp/id_rsa.pub" config.vm.provision "shell", inline: $script1 config.vm.boot_timeout = 1000
config.vm.define "Controller" do |controller| controller.vm.box = "bento/ubuntu-16.04" controller.vm.hostname = "Controller" controller.vm.network "forwarded_port", guest: 80, host: 8080, auto_correct: true controller.vm.network "private_network", ip: "10.0.0.11" controller.vm.network "private_network", ip: "192.168.100.11" controller.vm.provider "virtualbox" do |v| v.memory = 8192 v.cpus = 4 end end