ajout vagrantfile
This commit is contained in:
		
							
								
								
									
										36
									
								
								sio2/VAGRANT/Vagrantfile
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										36
									
								
								sio2/VAGRANT/Vagrantfile
									
									
									
									
										vendored
									
									
								
							@@ -1,14 +1,32 @@
 | 
			
		||||
# -*- mode: ruby -*-
 | 
			
		||||
# vi: set ft=ruby :
 | 
			
		||||
Vagrant.configure("2") do |config|
 | 
			
		||||
  config.vm.provision "shell", inline: "apt-get update -y" # execute pour chacune des machines
 | 
			
		||||
 | 
			
		||||
  config.vm.define "IDS" do |ids|#VM No'1
 | 
			
		||||
    ids.vm.box = "debian/bookworm64" #Setting machine type
 | 
			
		||||
    ids.vm.hostname = "IDS" #Setting machine type
 | 
			
		||||
    ids.vm.network "public_network"#Set DHCP
 | 
			
		||||
    ids.vm.provision "shell", inline: <<-SHELL
 | 
			
		||||
     apt-get install -y wget curl vim unzip chkrootkit rkhunter fail2ban
 | 
			
		||||
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 = "debian/bookworm64"
 | 
			
		||||
  config.vm.hostname = "nagios4"
 | 
			
		||||
 | 
			
		||||
  # Disable automatic box update checking. If you disable this, then
 | 
			
		||||
  # boxes will only be checked for updates when the user runs
 | 
			
		||||
  # `vagrant box outdated`. This is not recommended.
 | 
			
		||||
  # config.vm.box_check_update = false
 | 
			
		||||
 | 
			
		||||
  # Create a public network, which generally matched to bridged network.
 | 
			
		||||
  # Bridged networks make the machine appear as another physical device on
 | 
			
		||||
  # your network.
 | 
			
		||||
  config.vm.network "public_network"
 | 
			
		||||
 | 
			
		||||
   config.vm.provision "shell", inline: <<-SHELL
 | 
			
		||||
      apt-get update
 | 
			
		||||
      apt-get install -y vim curl wget apache2 php nagios4 nagios-plugins-contrib
 | 
			
		||||
      cp /etc/nagios4/apache2.conf /etc/apache2/sites-available/nagios4.conf
 | 
			
		||||
      a2ensite nagios4.conf
 | 
			
		||||
      a2enmod rewrite cgi
 | 
			
		||||
      systemctl reload apache2
 | 
			
		||||
   SHELL
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
							
								
								
									
										14
									
								
								sio2/VAGRANT/Vagrantfile2
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								sio2/VAGRANT/Vagrantfile2
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
			
		||||
# -*- mode: ruby -*-
 | 
			
		||||
# vi: set ft=ruby :
 | 
			
		||||
Vagrant.configure("2") do |config|
 | 
			
		||||
  config.vm.provision "shell", inline: "apt-get update -y" # execute pour chacune des machines
 | 
			
		||||
 
 | 
			
		||||
  config.vm.define "IDS" do |ids|#VM No'1
 | 
			
		||||
    ids.vm.box = "debian/bookworm64" #Setting machine type
 | 
			
		||||
    ids.vm.hostname = "IDS" #Setting machine type
 | 
			
		||||
    ids.vm.network "public_network"#Set DHCP
 | 
			
		||||
    ids.vm.provision "shell", inline: <<-SHELL
 | 
			
		||||
     apt-get install -y wget curl vim unzip chkrootkit rkhunter fail2ban
 | 
			
		||||
   SHELL
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
		Reference in New Issue
	
	Block a user