Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (25 sloc) 881 Bytes
Vagrant.configure(2) do |config|
config.vm.box = "bento/ubuntu-16.04"
config.vm.provision "shell", path: "./provision.sh", privileged: false
config.vm.provision "docker"
config.vm.provider "hyperv" do |h|
h.memory = "1024"
h.linked_clone = true
end
config.vm.define "n1" do |n1|
n1.vm.hostname = "nomad1"
n1.vm.provision "shell", path: "./server.sh", privileged: false
n1.trigger.after :up do |trigger|
trigger.info = "writing out ip address"
trigger.run_remote = { inline: "ip route get 1 | awk '{print $NF;exit}' > /vagrant/server_ip" }
end
end
config.vm.define "n2" do |n2|
n2.vm.hostname = "nomad2"
n2.vm.provision "shell", path: "./client.sh", privileged: false
end
config.vm.define "n3" do |n3|
n3.vm.hostname = "nomad3"
n3.vm.provision "shell", path: "./client.sh", privileged: false
end
end