“cameron.desrayaud” 23ddc9a40d Fichier Mission2
2021-12-15 11:40:10 +01:00

30 lines
703 B
YAML

---
- name: "MYSQL - creation base de données"
community.mysql.mysql_db:
name: sdis29
state: present
login_unix_socket: /var/run/mysqld/mysqld.sock
check_implicit_admin: yes
- name: "MYSQL - creation utilisateur"
mysql_user:
name: "dev"
password: "Azerty1+"
priv: "*.*:ALL"
host: "localhost"
login_unix_socket: /var/run/mysqld/mysqld.sock
- name: copie de la base de donnée
copy:
src: ~/sauvegarde/sql/sdis29-dump.sql
dest: /tmp/
- name: Importation de la base de données
mysql_db:
name: sdis29
state: import
target: /tmp/sdis29.sql
login_user: dev
login_password: Azerty1+
login_unix_socket: /var/run/mysqld/mysqld.sock