forked from thiagodasilva/ansible-saio
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVagrantfile
More file actions
25 lines (24 loc) · 706 Bytes
/
Vagrantfile
File metadata and controls
25 lines (24 loc) · 706 Bytes
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
Vagrant.configure(2) do |config|
config.vm.box = "bento/centos-7.2"
#config.vm.box = "chef/fedora-20"
VMS = 1
(0..VMS-1).each do |vm|
config.vm.define "server#{vm}" do |g|
g.vm.hostname = "server#{vm}"
g.vm.network :private_network, type: "dhcp"
g.vm.provider :virtualbox do |vb|
vb.memory = 2048
vb.cpus = 2
end
if vm == (VMS-1)
g.vm.provision :ansible do |ansible|
ansible.playbook = "site.yml"
ansible.groups = {
"storage" => (0..VMS-1).map { |v| "server#{v}" }
}
ansible.limit='all'
end
end
end
end
end