Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- mode: ruby -*-
- # vi: set ft=ruby :
- hosts = {
- "n1" => "192.168.77.10",
- "n2" => "192.168.77.11",
- "n3" => "192.168.77.12",
- "n4" => "192.168.77.13"
- }
- Vagrant.configure("2") do |config|
- # always use Vagrants insecure key
- config.ssh.insert_key = false
- # forward ssh agent to easily ssh into the different machines
- config.ssh.forward_agent = true
- config.vm.box_check_update = false
- check_guest_additions = false
- functional_vboxsf = false
- config.vm.box = "bento/ubuntu-16.04"
- config.vm.network "forwarded_port", guest: 6443, host: 6443, guest_ip: "192.168.77.10" , auto_correct: true
- hosts.each do |name, ip|
- config.vm.define name do |machine|
- machine.vm.network :private_network, ip: ip
- machine.vm.provider "virtualbox" do |v|
- v.name = name
- v.memory=2048
- end
- machine.vm.hostname=name # added by saeid
- end
- end
- end
Add Comment
Please, Sign In to add comment