Ajout Vagrantfile
This commit is contained in:
		
							
								
								
									
										28
									
								
								sio2/sisr/10-ha/Vagrantfile
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								sio2/sisr/10-ha/Vagrantfile
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,28 @@ | |||||||
|  |     # -*- mode: ruby -*- | ||||||
|  |     # vi: set ft=ruby : | ||||||
|  |     Vagrant.configure("2") do |config| | ||||||
|  |       config.vm.provision "shell", inline: "apt-get update" # execute pour chacune des machines | ||||||
|  |       | ||||||
|  |       config.vm.define "srv1" do |srv1|#VM No'1 | ||||||
|  |         srv1.vm.box = "debian/bookworm64" #Setting machine type | ||||||
|  |         srv1.vm.hostname = "srv1" #Setting machine type | ||||||
|  |         srv1.vm.network "public_network", ip: "192.168.0.121"#Set static IP | ||||||
|  |         srv1.vm.provision "shell", inline: <<-SHELL | ||||||
|  |          timedatectl set-timezone Europe/Paris | ||||||
|  |          apt-get install -y wget curl vim unzip apache2 | ||||||
|  |          echo "192.168.0.122 srv2" >> /etc/hosts | ||||||
|  |        SHELL | ||||||
|  |       end | ||||||
|  |       | ||||||
|  |       config.vm.define "srv2" do |srv2|# VM No2 | ||||||
|  |         srv2.vm.box = "debian/bookworm64" #Setting machine type | ||||||
|  |         srv2.vm.hostname = "srv2" #Setting machine type | ||||||
|  |         srv2.vm.network "public_network", ip: "192.168.0.122"  #Set static IP | ||||||
|  |         srv2.vm.provision "shell", inline: <<-SHELL | ||||||
|  |          timedatectl set-timezone Europe/Paris | ||||||
|  |          apt-get install -y wget curl vim unzip apache2 | ||||||
|  |          echo "192.168.0.121 srv1" >> /etc/hosts | ||||||
|  |         SHELL | ||||||
|  |       end | ||||||
|  |     end | ||||||
|  |  | ||||||
		Reference in New Issue
	
	Block a user