diff --git a/sio2/AP/apbase.yml b/sio2/AP/apbase.yml index 438445f..e349d14 100644 --- a/sio2/AP/apbase.yml +++ b/sio2/AP/apbase.yml @@ -1,14 +1,14 @@ --- - name: apbase hosts: web - -- name: Installer les paquets apache2 php adminer - apt: - name: - - apache2 - - php - - adminer - - php-mbstring -- state: present + tasks: + - name: Installer les paquets apache2 php et adminer + apt: + name: + - apache2 + - php + - adminer + - php-mbstring + state: present diff --git a/sio2/AP/apdb.yml b/sio2/AP/apdb.yml index 1beef70..12125ab 100644 --- a/sio2/AP/apdb.yml +++ b/sio2/AP/apdb.yml @@ -1,43 +1,44 @@ --- - name: apbase hosts: web - become: yes + become: yes + tasks: -- name: Installer mariadb - apt: - name: - - mariadb-server - - python3-PyMySQL - state: present + - name: 1. Installer mariadb + apt: + name: + - mariadb-server + - python3-PyMySQL + state: present -- name: s'assurer que mariadb est en fonctionnement - service: - name: mariadb-server - state: started + - name: 2. s'assurer que mariadb est en fonctionnement + service: + name: mariadb-server + state: started -- name: Creer un utilisateur 'admin' lui attribuer tous les droits - community.mysql.mysql_user: - name: admin - password: admin - priv: '*.*:ALL' - state: present + - name: 3. Creer un utilisateur 'admin' lui attribuer tous les droits + community.mysql.mysql_user: + name: admin + password: admin + priv: '*.*:ALL' + state: present -- name: Creation de la base de donnee 'sdis2023' - mysql_db: - name: sdis2023 - state: present + - name: 4. Creation de la base de donnee 'sdis2023' + community.mysql_db.mysql_db: + name: sdis2023 + state: present -# Copy database dump file to remote host and restore it to database 'sdis2023' -- name: Copie du dump de la BDD - copy: - src: sdis2023.sql - dest: /tmp/ +# Copier le fichier de sauvegarde de la base de données sur l'hôte distant et le restaurer dans la base de données 'sdis2023' + - name: 5. Copie de la sauvegarde de la base de données sur l'hôte distant + copy: + src: sdis2023.sql + dest: /tmp/ -- name: Restore database - community.mysql.mysql_db: - name: sdis2023 - state: import - target: /tmp/sdis2023 + - name: 6. Restaurer la base de données + community.mysql.mysql_db: + name: sdis2023 + state: import + target: /tmp/sdis2023 #- name: Restore d #community.mysql.mysql_db: