40 lines
1.1 KiB
Ruby
40 lines
1.1 KiB
Ruby
IMAGE_NAME = "debian/bullseye64"
|
|
N =2
|
|
node_ip = "192.168.56.10"
|
|
Vagrant.configure("2") do |config|
|
|
config.ssh.insert_key = false
|
|
|
|
config.vm.provider "virtualbox" do |v|
|
|
v.memory = 512
|
|
v.cpus = 1
|
|
end
|
|
|
|
config.vm.define "journald-rcv" do |master|
|
|
master.vm.box = IMAGE_NAME
|
|
master.vm.network "private_network", ip: "192.168.56.10"
|
|
master.vm.hostname = "journald-rcv"
|
|
master.vm.provision "shell" do |shell|
|
|
shell.path = "journald-rcv.sh"
|
|
end
|
|
# master.vm.provision "ansible" do |ansible|
|
|
# ansible.playbook = "kubernetes-setup/master-playbook.yml"
|
|
# ansible.extra_vars = {
|
|
# node_ip: "192.168.56.10",
|
|
# }
|
|
# end
|
|
end
|
|
|
|
(1..N).each do |i|
|
|
config.vm.define "journald-snd-#{i}" do |node|
|
|
node.vm.box = IMAGE_NAME
|
|
node.vm.network "private_network", ip: "192.168.56.#{i + 10}"
|
|
node.vm.hostname = "journald-snd-#{i}"
|
|
node.vm.provision "shell" do |shell|
|
|
shell.path = "journald-snd.sh"
|
|
shell.args = node_ip
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|