forked from guillaume.emorine/siotp
Ajout des derniers fichiers du TP sur Ansible, fonctionnel et validé.
This commit is contained in:
30
bts_annee_2/sisr2/ansible/doku_vagrant/Vagrantfile
vendored
Normal file
30
bts_annee_2/sisr2/ansible/doku_vagrant/Vagrantfile
vendored
Normal 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
|
Reference in New Issue
Block a user