-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
35 lines (30 loc) · 1.09 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
nodes = [
{ :hostname => "md", :mac => "525400836f54", :ram => 4096 },
{ :hostname => "ps1", :mac => "525400836f51", :ram => 2048 },
{ :hostname => "ps2", :mac => "525400836f52", :ram => 2048 },
{ :hostname => "ps3", :mac => "525400836f53", :ram => 2048 }
]
Vagrant.configure("2") do |config|
nodes.each do |node|
config.vm.define node[:hostname] do |node_config|
node_config.vm.box = "centos/7"
node_config.vm.network :public_network, :mac => node[:mac], bridge: "enp0s20f0u2"
node_config.vm.provision "file", source: "/home/vagrant/.ssh/id_ed25519.pub", destination: "/home/vagrant/.ssh/authorized_keys"
node_config.vm.hostname = node[:hostname]
node_config.vm.provider :virtualbox do |domain|
domain.memory = node[:ram]
domain.cpus = 1
end
end
end
config.vm.provision "ansible" do |ansible|
ansible.compatibility_mode = "2.0"
ansible.playbook = "Testpoint-MaDDashbuild.yml"
ansible.groups = {
"testpoint" => ["ps1", "ps2", "ps3"],
"md-arch" => ["md"]
}
end
end