-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathVagrantfile
More file actions
41 lines (34 loc) · 1.09 KB
/
Vagrantfile
File metadata and controls
41 lines (34 loc) · 1.09 KB
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "generic/ubuntu1804"
config.ssh.insert_key = false
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.define "calico1" do |vm1|
vm1.vm.hostname = "calico1.test"
vm1.vm.network :private_network, ip: "192.168.4.5"
end
config.vm.define "calico2" do |vm2|
vm2.vm.hostname = "calico2.test"
vm2.vm.network :private_network, ip: "192.168.4.6"
end
config.vm.define "etcd-node" do |en1|
en1.vm.hostname = "etcd-node.test"
en1.vm.network :private_network, ip: "192.168.4.7"
end
config.vm.provision "ansible" do |ansible|
ansible.playbook = "site.yml"
ansible.groups = {
"calico_nodes" => ["calico1", "calico2"],
"etcd_nodes" => ["etcd-node"],
"all_nodes:children" => ["calico_nodes", "etcd_nodes"]
}
end
# config.vm.provision "common", type:'ansible' do |ansible|
# ansible.playbook = "common.yml"
# end
#
# config.vm.provision "package-install", type:'ansible' do |ansible|
# ansible.playbook = "package_install.yml"
# end
end