2025-02-07 08:23:01 +01:00

57 lines
1.7 KiB
Ruby

# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# Base VM OS configuration.
config.vm.box = "alvistack/ubuntu-24.04"
config.ssh.insert_key = false
config.vm.synced_folder '.', '/vagrant', disabled: true
# General VirtualBox VM configuration.
config.vm.provider :virtualbox do |v|
v.memory = 1024
v.cpus = 1
v.linked_clone = true
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--ioapic", "on"]
end
# wazuh.
config.vm.define "wazuh" do |wazuh|
wazuh.vm.hostname = "wazuh"
wazuh.vm.network :private_network, ip: "192.168.56.5"
wazuh.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--memory", 4096]
v.cpus = 2
end
wazuh.vm.provision "shell",
inline: "sudo apt-get update ; sudo apt-get install -y vim curl wget"
wazuh.vm.provision "ansible" do |ansible|
ansible.extra_vars = {
wazuh_db_name: "wazuh",
wazuh_db_user: "wazuh-server",
wazuh_db_passwd: "wazuh-passwd",
}
ansible.playbook = "provision/setup-wazuh.yml"
end
end
# wazuh-cli.
config.vm.define "wazucli" do |wazucli|
wazucli.vm.hostname = "wazu-cli"
wazucli.vm.network :private_network, ip: "192.168.56.2"
wazucli.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--memory", 1024]
end
wazucli.vm.provision "shell",
inline: "sudo apt-get update ; sudo apt-get install -y vim curl wget"
wazucli.vm.provision "ansible" do |ansible|
ansible.extra_vars = {
srv_name: "wazu-cli",
srv_ip: "192.168.56.2",
}
ansible.playbook = "provision/setup-wazu-cli.yml"
end
end
end