-
Notifications
You must be signed in to change notification settings - Fork 2
/
Vagrantfile
49 lines (39 loc) · 1.06 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
44
45
46
47
48
49
# -*- mode: ruby -*-
# vi: set ft=ruby :
MACHINES = [
{
"id" => "test-centos01",
"vm" => {
"box" => "centos6.5",
"box_url" => "https://github.com/2creatives/vagrant-centos/releases/download/v6.5.1/centos65-x86_64-20131205.box"
}
}
]
ANSIBLE = {
"groups" => {
"test" => [ "test-centos01" ],
}
}
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provision :ansible do |ansible|
ansible.sudo = true
ansible.playbook = "vagrant.yml"
ansible.verbose = "v"
ansible.host_key_checking = false
ansible.groups = ANSIBLE["groups"]
end
config.vm.provider "virtualbox" do |v|
v.memory = 1024
v.cpus = 2
end
MACHINES.each do |machine|
config.vm.define machine["id"] do |node|
node.vm.hostname = machine["id"]
node.vm.box = machine["vm"]["box"]
node.vm.box_url = machine["vm"]["box_url"]
node.vm.network :private_network, type: "dhcp"
node.vm.network "forwarded_port", guest: 8081, host: 8081, auto_correct: true
end
end
end