Ajout des derniers fichiers du TP sur Ansible, fonctionnel et validé.

This commit is contained in:
Guillaume Emorine
2024-10-14 17:22:04 +02:00
parent 1dfe133ed7
commit 5b1d78f9ff
22 changed files with 134 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# Every Vagrant development environment requires a box. You can search for
# boxes at https://vagrantcloud.com/search.
config.vm.box = "debian/bookworm64"
config.vm.box_check_update = true
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# NOTE: This will enable public access to the opened port
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.network "forwarded_port", guest: 22, host: 2022
config.vm.provision "shell", inline: <<-SHELL
apt update && apt-get upgrade -y
SHELL
config.vm.provision "ansible" do |ansible|
ansible.playbook = "local.yml" # lance le playbook local.yml
end
end