20 lines
407 B
YAML
20 lines
407 B
YAML
---
|
|
- hosts: all
|
|
become: true
|
|
tasks:
|
|
- name: 1. installe Apache
|
|
apt:
|
|
name: apache2
|
|
state: present
|
|
|
|
- name: Copier le fichier HTML vers le répertoire du serveur web
|
|
copy:
|
|
src: index.html
|
|
dest: /var/www/html/index.html
|
|
mode: '0644'
|
|
|
|
- name: S'assurer que le service Apache est démarré
|
|
service:
|
|
name: apache2
|
|
state: started
|
|
enabled: yes |