forked from ansible/lightbulb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
83 lines (70 loc) · 2.59 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |cluster|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
cluster.vm.define "ansible-node" do |config|
config.vm.box = "bento/centos-7.2"
config.ssh.insert_key = false
config.ssh.forward_agent = true
config.vm.provider :virtualbox do |vb, override|
vb.customize ["modifyvm", :id, "--memory", "128"]
vb.customize ["modifyvm", :id, "--cpus", "1"]
end
config.vm.hostname = "ansible-node"
config.vm.network :private_network, ip: "10.42.0.2"
end
cluster.vm.define "node-1" do |config|
config.vm.box = "bento/centos-7.2"
config.ssh.insert_key = false
config.vm.provider :virtualbox do |vb, override|
vb.customize ["modifyvm", :id, "--memory", "256"]
vb.customize ["modifyvm", :id, "--cpus", "1"]
end
config.vm.hostname = "node-1"
config.vm.network :private_network, ip: "10.42.0.6"
end
cluster.vm.define "node-2" do |config|
config.vm.box = "bento/centos-7.2"
config.ssh.insert_key = false
config.vm.provider :virtualbox do |vb, override|
vb.customize ["modifyvm", :id, "--memory", "256"]
vb.customize ["modifyvm", :id, "--cpus", "1"]
end
config.vm.hostname = "node-2"
config.vm.network :private_network, ip: "10.42.0.7"
end
cluster.vm.define "node-3" do |config|
config.vm.box = "bento/centos-7.2"
#config.vm.box = "bento/ubuntu-14.04"
config.ssh.insert_key = false
config.vm.provider :virtualbox do |vb, override|
vb.customize ["modifyvm", :id, "--memory", "256"]
vb.customize ["modifyvm", :id, "--cpus", "1"]
end
config.vm.hostname = "node-3"
config.vm.network :private_network, ip: "10.42.0.8"
end
cluster.vm.define "node-4" do |config|
config.vm.box = "bento/centos-7.2"
config.ssh.insert_key = false
config.vm.provider :virtualbox do |vb, override|
vb.customize ["modifyvm", :id, "--memory", "256"]
vb.customize ["modifyvm", :id, "--cpus", "1"]
end
config.vm.hostname = "node-4"
config.vm.network :private_network, ip: "10.42.0.100"
end
cluster.vm.define "tower" do |config|
config.vm.box = "http://vms.ansible.com/ansible-tower-2.4.4-virtualbox.box"
config.ssh.insert_key = false
config.vm.provider :virtualbox do |vb, override|
vb.customize ["modifyvm", :id, "--memory", "2048"]
vb.customize ["modifyvm", :id, "--cpus", "1"]
end
config.vm.hostname = "tower"
end
end