From b91532aff358826dd9d3c04588b0cd8dcebe5a69 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Wed, 27 May 2015 13:39:09 -0700 Subject: [PATCH] Drop the mysql test db first so that we test with a clean slate. --- test/integration/roles/test_mysql_db/tasks/main.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/integration/roles/test_mysql_db/tasks/main.yml b/test/integration/roles/test_mysql_db/tasks/main.yml index 60a573bd0b8..a059cd212a8 100644 --- a/test/integration/roles/test_mysql_db/tasks/main.yml +++ b/test/integration/roles/test_mysql_db/tasks/main.yml @@ -17,6 +17,11 @@ # along with Ansible. If not, see . # ============================================================ + +- name: make sure the test database is not there + command: mysql "-e drop database '{{db_name}}';" + ignore_errors: True + - name: test state=present for a database name (expect changed=true) mysql_db: name={{ db_name }} state=present register: result