# -*- mode: ruby -*- # vi: set ft=ruby : Vagrant.configure("2") do |config| # Base VM OS configuration. config.vm.box = "debian/bookworm64" 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"] v.check_guest_additions = false end # wazuh. config.vm.define "wazuh" do |wazuh| wazuh.vm.box = "alvistack/ubuntu-24.04" 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", 4100] v.cpus = 2 end wazuh.vm.provision "shell", inline: "sudo apt-get update ; sudo apt-get install -y vim curl wget gnupg" 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 "wazuhcli" do |wazucli| wazucli.vm.hostname = "wazuh-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: "timedatectl set-timezone Europe/Paris ; apt-get update ; apt-get install -y vim curl wget gnupg" wazucli.vm.provision "ansible" do |ansible| ansible.extra_vars = { srv_ip: "192.168.56.5", } ansible.playbook = "provision/setup-wazuh-cli.yml" end end end