-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
56 lines (53 loc) · 1.61 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https:#docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https:#vagrantcloud.com/search.
config.vm.box = "ubuntu/jammy64"
config.vm.box_check_update = false
machines = [
{ name: 'control01', ip: '192.168.56.10' },
{ name: 'node01', ip: '192.168.56.11' },
# {name: 'node02', ip: '192.168.56.12' },
]
config.vm.provider :virtualbox do |vb|
vb.cpus = 2
vb.memory = '2048'
end
etc_hosts = machines.collect{ |vm|
{ domain: vm[:name], ip: vm[:ip] }
}
machines.each { |vm|
config.vm.define(vm[:name], privileged: false) { |cfg|
cfg.vm.hostname = vm[:name]
cfg.vm.network :private_network, ip: vm[:ip]
cfg.vm.synced_folder './cluster', '.', disabled: true
cfg.vm.provision :ansible do |ansible|
ansible.compatibility_mode = "2.0"
ansible.playbook = 'cluster/main.yml'
ansible.extra_vars = {
host_ip: vm[:ip],
etc_hosts: etc_hosts,
no_falco: true,
no_gvisor: false,
no_gatekeeper: true,
no_metrics_server: false,
no_dashboard: true,
no_ipvs: false,
enable_audit: true,
}
ansible.groups = {
'control': ['control01'],
'node': [
'node01',
# 'node02',
],
'setup': ['node01'],
}
end
}
}
end