Modifications apportées au dossier des vagrantfiles, ainsi qu'au
vagrantfile template.
This commit is contained in:
12
bts_annee_2/vagrantfiles/wazuh/.vagrant/rgloader/loader.rb
Normal file
12
bts_annee_2/vagrantfiles/wazuh/.vagrant/rgloader/loader.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
# This file loads the proper rgloader/loader.rb file that comes packaged
|
||||
# with Vagrant so that encoded files can properly run with Vagrant.
|
||||
|
||||
if ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"]
|
||||
require File.expand_path(
|
||||
"rgloader/loader", ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"])
|
||||
else
|
||||
raise "Encoded files can't be read outside of the Vagrant installer."
|
||||
end
|
56
bts_annee_2/vagrantfiles/wazuh/Vagrantfile
vendored
Normal file
56
bts_annee_2/vagrantfiles/wazuh/Vagrantfile
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
# -*- 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
|
||||
|
Reference in New Issue
Block a user