diff --git a/roles/zabbix-srv/tasks/main.yml b/roles/zabbix-srv/tasks/main.yml index 01e0427..87feaec 100644 --- a/roles/zabbix-srv/tasks/main.yml +++ b/roles/zabbix-srv/tasks/main.yml @@ -53,7 +53,14 @@ login_unix_socket: /var/run/mysqld/mysqld.sock - name: 9. Importer le schema initial - shell: zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -ppassword zabbix + community.mysql.mysql_db: + state: import + name: zabbix + encoding: utf8mb4 + login_user: zabbix + login_password: password + target: /usr/share/zabbix-sql-scripts/mysql/server.sql.gz + login_unix_socket: /var/run/mysqld/mysqld.sock - name: 10. Modifier la variable pour le schema community.mysql.mysql_variables: