correction playbook
This commit is contained in:
parent
9bdbe30539
commit
9a9122c181
@ -1,14 +1,14 @@
|
||||
---
|
||||
- name: apbase
|
||||
hosts: web
|
||||
|
||||
- name: Installer les paquets apache2 php adminer
|
||||
tasks:
|
||||
- name: Installer les paquets apache2 php et adminer
|
||||
apt:
|
||||
name:
|
||||
- apache2
|
||||
- php
|
||||
- adminer
|
||||
- php-mbstring
|
||||
- state: present
|
||||
state: present
|
||||
|
||||
|
||||
|
@ -2,38 +2,39 @@
|
||||
- name: apbase
|
||||
hosts: web
|
||||
become: yes
|
||||
tasks:
|
||||
|
||||
- name: Installer mariadb
|
||||
- name: 1. Installer mariadb
|
||||
apt:
|
||||
name:
|
||||
- mariadb-server
|
||||
- python3-PyMySQL
|
||||
state: present
|
||||
|
||||
- name: s'assurer que mariadb est en fonctionnement
|
||||
- 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
|
||||
- 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: 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
|
||||
# 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
|
||||
- name: 6. Restaurer la base de données
|
||||
community.mysql.mysql_db:
|
||||
name: sdis2023
|
||||
state: import
|
||||
|
Loading…
x
Reference in New Issue
Block a user