2023-11-23 13:06:41 +01:00

33 lines
837 B
YAML

---
- name: Creer la BDD, creer les comptes et injecter la BDD
hosts: all
become: true
tasks:
- name: creation de la BDD sdis29-1
community.mysql.mysql_db:
name: sdis29-1
state: present
login_unix_socket: /var/run/mysqld/mysqld.sock
- name: copie de la base de donnees
copy:
src: sdis2023.sql
dest: /tmp
- name: restauration de la base de donnees
community.mysql.mysql_db:
name: sdis29-1
state: import
target: /tmp/sdis2023.sql
force: true
login_unix_socket: /var/run/mysqld/mysqld.sock
- name: creation de lutilisateur slam
community.mysql.mysql_user:
name: slam
password: Azerty1+
priv: '*.*:ALL,GRANT'
state: present
login_unix_socket: /var/run/mysqld/mysqld.sock