Skip to content

Instantly share code, notes, and snippets.

@soulsearcher
Created January 20, 2018 12:18
Show Gist options
  • Save soulsearcher/0e676dc4b95137e56a685d1c2bfe60a0 to your computer and use it in GitHub Desktop.
Save soulsearcher/0e676dc4b95137e56a685d1c2bfe60a0 to your computer and use it in GitHub Desktop.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
(60..63).each do |i|
config.vm.define "haproxy-#{i}" do |node|
node.vm.box = "bento/ubuntu-16.04"
node.vm.provider:virtualbox do |vb|
vb.name = "haproxy-#{i}"
vb.cpus = 1
vb.memory = 512
end
node.vm.host_name = "haproxy-#{i}"
node.vm.synced_folder ".", "/vagrant", disabled: true
node.vm.network "private_network", ip: "192.168.56.#{i}"
node.vm.network "forwarded_port", guest: 22, host: "222#{i}", auto_correct: false, id: "ssh"
node.vm.provision "shell",
inline: "echo hello from node #{i}"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment