mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #13173 from willthames/mysql_drop_test
Handle unexpected database presence
This commit is contained in:
commit
18c8a21a67
1 changed files with 3 additions and 2 deletions
|
@ -19,8 +19,9 @@
|
|||
# ============================================================
|
||||
|
||||
- name: make sure the test database is not there
|
||||
command: mysql "-e drop database '{{db_name}}';"
|
||||
ignore_errors: True
|
||||
command: mysql {{db_name}}
|
||||
register: mysql_db_check
|
||||
failed_when: "'1049' not in mysql_db_check.stderr"
|
||||
|
||||
- name: test state=present for a database name (expect changed=true)
|
||||
mysql_db: name={{ db_name }} state=present
|
||||
|
|
Loading…
Reference in a new issue