ajout ansible
This commit is contained in:
4
ansible/roles/dbdump/handlers/main.yml
Normal file
4
ansible/roles/dbdump/handlers/main.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
- name: restart mysql
|
||||
service:
|
||||
name: mysql
|
||||
state: restarted
|
17
ansible/roles/dbdump/tasks/main.yml
Normal file
17
ansible/roles/dbdump/tasks/main.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
- name: Création d'un dump
|
||||
mysql_db:
|
||||
state: dump
|
||||
name: sdis29
|
||||
target: /tmp/sdis29.sql
|
||||
login_user: slam
|
||||
login_password: Azerty1+
|
||||
login_unix_socket: /var/run/mysqld/mysqld.sock
|
||||
|
||||
- name: Copie du dump distant
|
||||
ansible.builtin.fetch:
|
||||
src: /tmp/sdis29.sql
|
||||
dest: /root/sauvegarde/sql/
|
||||
flat: yes
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user