- name: "Mise à jour du cache MYSQL" apt: update_cache: yes - name: "Installation de MYSQL" apt: name: mariadb-server state: latest - name: "Installation Python" apt: name: python state: latest - name: "Installation Python3-pymysql" apt: name: python3-pymysql state: latest - name: "Démarrage MYSQL" service: name: "mysqld" state: started enabled: yes - name: "Création de la BDD" community.mysql.mysql_db: name : "sdis29" check_implicit_admin: yes login_unix_socket: /var/run/mysqld/mysqld.sock login_user: root login_password: root state: present - name: "Création utilisateur BDD" mysql_user: check_implicit_admin: yes login_user: root login_password: root name: "dev" password: "Azerty1+" priv: "*.*:ALL,GRANT" host: "localhost" login_unix_socket: /var/run/mysqld/mysqld.sock - name: copie du dump copy: src: ~/sauvegarde/sdis-dump.sql dest: /tmp/ - name: "Restorer de la BDD" community.mysql.mysql_db: name: sdis29 state: import target: /tmp/sdis29.sql login_unix_socket: /var/run/mysqld/mysqld.sock login_user: dev login_password: Azerty1+