2021-12-13 11:38:08 +01:00

45 lines
768 B
YAML

- name: "[MYSQL] - update cache"
apt:
update_cache: yes
- name: "[MYSQL] - install"
apt:
name: mariadb-server
state: latest
- name: "[Python] - install"
apt:
name: python
state: latest
- name: "[MYSQL] - start mysql"
service:
name: "mysqld"
state: started
enabled: yes
- name: "[MYSQL] - create database"
community.mysql.mysql_db:
name:
- sdis29
state: present
- name: "[MYSQL] - create user"
mysql_user:
name: "slam"
password: "Azerty1+"
priv: "*.*:ALL"
host: "127.0.0.1"
become: yes
- name: Copier dump
copy:
src: db-sauv.sql.gz
dest: /tmp
- name: Restorer la base de données
community.mysql.mysql_db:
name: my_db
state: import
target: /tmp/db-sauv.sql.gz