-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
44 lines (33 loc) · 1.26 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Utilizar plugin vagrant-cachier si está disponible
if Vagrant.has_plugin?("vagrant-cachier")
#config.cache.scope = :box
end
# Definir máquinas virtuales mediante bloques
def servers
# |nodename, nodeip, nodebox, nodeprimary|
yield "nut-master", "172.31.0.10", "debian/wheezy64", true
yield "nut-slave", "172.31.0.11", "ubuntu/trusty64"
#yield "nut-slave2", "172.31.0.12", "debian/wheezy64"
end
# Configuración para servidores que usen NUT (maestros y esclavos)
servers do |nodename, nodeip, nodebox, nodeprimary|
config.vm.define nodename, primary: nodeprimary do |machine|
machine.vm.hostname = nodename
machine.vm.box = nodebox
machine.vm.network :private_network, ip: nodeip, :netmask => "255.255.0.0"
# machine.vm.synced_folder "data", "/vagrant_data"
machine.vm.provider :virtualbox do |vb|
# Nombre con el que aparece en VirtualBox
vb.name = nodename
vb.memory = 512
#vb.cpus = 2
#vb.gui = true
end
end
end # servers
end # configure