Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Vagrant.configure("2") do |config|
- servers=[
- {
- :hostname => "ansible",
- :box => "bento/ubuntu-20.04",
- :ip => "172.16.1.10",
- :ssh_port => '2200',
- :ram => 512,
- :vcpu => 1
- },
- {
- :hostname => "server1",
- :box => "bento/ubuntu-20.04",
- :ip => "172.16.1.11",
- :ssh_port => '2201',
- :ram => 512,
- :vcpu => 1
- },
- {
- :hostname => "server2",
- :box => "bento/ubuntu-20.04",
- :ip => "172.16.1.12",
- :ssh_port => '2202',
- :ram => 512,
- :vcpu => 1
- },
- {
- :hostname => "server3",
- :box => "bento/ubuntu-20.04",
- :ip => "172.16.1.13",
- :ssh_port => '2203',
- :ram => 512,
- :vcpu => 1
- },
- ]
- servers.each do |machine|
- config.vm.define machine[:hostname] do |node|
- node.vm.box = machine[:box]
- node.vm.hostname = machine[:hostname]
- node.vm.network :private_network, ip: machine[:ip]
- node.vm.network "forwarded_port", guest: 22, host: machine[:ssh_port], id: "ssh"
- end
- end
- config.vm.define "win2019"
- #config.vm.box = "StefanScherer/windows_2019"
- config.vm.box = "gusztavvargadr/windows-server"
- config.vm.hostname = "win2019"
- config.vm.network :private_network, ip: "172.16.1.99"
- config.vm.network "forwarded_port", guest: 3389, host: 33389, id: "rdp"
- config.vm.network "forwarded_port", guest: 5985, host: 50985, id: "rdp"
- config.vm.provider "virtualbox" do |vb|
- vb.customize ["modifyvm", :id, "--memory", 8192]
- vb.customize ["modifyvm", :id, "--cpus", 4]
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement