Skip to content
Snippets Groups Projects
Commit 53425a92 authored by jurgenhaas's avatar jurgenhaas
Browse files

Remove target db before importing it

parent bd9f7ceb
Branches
Tags
No related merge requests found
...@@ -22,6 +22,11 @@ ...@@ -22,6 +22,11 @@
tasks: tasks:
- name: "Copy Database to Target" - name: "Copy Database to Target"
local_action: shell scp {{ sourcehost }}:/tmp/{{ dbname }}.sql /tmp/{{ dbname }}.sql local_action: shell scp {{ sourcehost }}:/tmp/{{ dbname }}.sql /tmp/{{ dbname }}.sql
- name: "Remove Database"
mysql_db:
login_host=127.0.0.1
name={{ dbname }}
state=absent
- name: "Create Database" - name: "Create Database"
mysql_db: mysql_db:
login_host=127.0.0.1 login_host=127.0.0.1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment