Skip to content

Instantly share code, notes, and snippets.

@vi2co
Created January 30, 2018 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vi2co/334a9a37336b2a12fc8c2dd5df7a7780 to your computer and use it in GitHub Desktop.
Save vi2co/334a9a37336b2a12fc8c2dd5df7a7780 to your computer and use it in GitHub Desktop.
## Default config for each machine
Vagrant.configure(2) do |config|
config.ssh.insert_key = false
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024"]
end
## Per machine config
config.vm.define "haproxy1" do |haproxy1|
haproxy1.vm.hostname = "lb01.example.com"
haproxy1.vm.box = "centos/7"
haproxy1.vm.network :private_network, ip: "10.12.10.150"
haproxy1.vm.provision :shell, inline: "yum install haproxy telnet ftp -y"
# haproxy1.vm.provision :shell, path: "haproxy1.sh"
end
config.vm.define "testnode1" do |testnode1|
testnode1.vm.hostname = "testnode01.example.com"
testnode1.vm.box = "centos/7"
testnode1.vm.network :private_network, ip: "10.12.10.224"
testnode1.vm.provision :shell, inline: "yum install telnet ftp -y"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment