siotp/sio2/AP4/role/bdd/tasks/main.yml
2023-12-07 14:10:44 +01:00

31 lines
717 B
YAML

---
- name: glpidb.yml
hosts: glpi
become: yes
tasks:
- name: 1. Installer mariadb
apt:
name:
- mariadb-server
- python3-pymysql
state: present
- name: 2. s'assurer que mariadb est en fonctionnement
service:
name: mariadb
state: started
- name: 3. Creer un utilisateur et lui attribuer tous les droits
community.mysql.mysql_user:
name: glpi
password: glpi
priv: '*.*:ALL,GRANT'
state: present
login_unix_socket: /var/run/mysqld/mysqld.sock
- name: 4. Creation de la base de donnee 'db_glpi'
community.mysql.mysql_db:
name: db_glpi
state: present
login_unix_socket: /var/run/mysqld/mysqld.sock