# -*- mode: ruby -*- # vi: set ft=ruby : Vagrant.configure("2") do |config| config.vm.define "ipekatrinrouter" do |node| node.vm.box = "centos/7" node.vm.hostname = "ipekatrinrouter" node.vm.network "public_network", bridge: "br0", ip: "141.52.64.15", netmask: "255.255.254.0" node.vm.network "public_network", bridge: "br0", ip: "141.52.64.17", netmask: "255.255.254.0" node.vm.network "public_network", bridge: "br0", ip: "192.168.26.254" node.vm.provision "shell", run: "always", inline: "( ip addr show | grep 64.15 ) || ifcfg eth1 141.52.64.15/23" node.vm.provision "shell", run: "always", inline: "( ip addr show | grep 64.17 ) || ifcfg eth2 141.52.64.17/23" node.vm.provision "shell", run: "always", inline: "( ip addr show | grep 192.168.26 ) || ifcfg eth3 192.168.26.254" node.vm.provision "shell", run: "always", inline: "chmod +r /etc/sysconfig/network-scripts/ifcfg-eth*" node.vm.provision "shell", run: "always", inline: "chcon --reference /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth*" node.vm.provision "shell" do |s| ssh_pub_key = File.readlines("/Image/My/Private/ssh/authorized_keys").first.strip s.inline = <<-SHELL mkdir -p /root/.ssh/ echo #{ssh_pub_key} >> /root/.ssh/authorized_keys SHELL end node.vm.provider "virtualbox" do |vb| vb.memory = "1024" vb.customize [ "modifyvm", :id, "--audio", "none", ] end end end