From d18f102841629225349d3b3b1b2e62585bfdee79 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 13 Oct 2023 13:03:04 +0200 Subject: [PATCH] playbook ansible --- sio2/ANSIBLE/hosts | 6 ++++++ sio2/ANSIBLE/web.yml | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 sio2/ANSIBLE/hosts create mode 100644 sio2/ANSIBLE/web.yml diff --git a/sio2/ANSIBLE/hosts b/sio2/ANSIBLE/hosts new file mode 100644 index 0000000..ce091d1 --- /dev/null +++ b/sio2/ANSIBLE/hosts @@ -0,0 +1,6 @@ +[adm] +infra + +[web] +web1 +web2 diff --git a/sio2/ANSIBLE/web.yml b/sio2/ANSIBLE/web.yml new file mode 100644 index 0000000..a8d24b7 --- /dev/null +++ b/sio2/ANSIBLE/web.yml @@ -0,0 +1,20 @@ +--- +- name: web.yml + hosts: web + tasks: + - name: 1. installer apache2 + apt : + name: apache2 + state: present + - name: 2 installer php-mbstring + apt: + name: php-mbstring + state: present + - name: 3 assurer Apache tourne + service: + name: apache2 + state: started + - name: 4 copier le fichier index.html vers /var/www/html + template: + src: index.html + dest: /var/www/html/