feat: initial commit
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
---
|
||||
- name: Copier et exécuter le fichier SQL depuis Debian vers MySQL Ubuntu
|
||||
hosts: debian
|
||||
become: yes
|
||||
tasks:
|
||||
- name: Copier le fichier schema.sql sur Debian
|
||||
ansible.builtin.copy:
|
||||
src: ../../sql/schema.sql
|
||||
dest: /tmp/schema.sql
|
||||
mode: '0644'
|
||||
|
||||
- name: Créer la table définie dans le fichier SQL sur MySQL Ubuntu
|
||||
ansible.builtin.shell: >-
|
||||
mysql -h {{ mysql_host }} -P {{ mysql_port }}
|
||||
-uroot -p{{ mysql_root_password }}
|
||||
{{ mysql_database }} < /tmp/schema.sql
|
||||
args:
|
||||
executable: /bin/bash
|
||||
changed_when: true
|
||||
Reference in New Issue
Block a user