diff --git a/lib/ansible/modules/database/mysql/mysql_user.py b/lib/ansible/modules/database/mysql/mysql_user.py index 8c16d136560..b930b716136 100644 --- a/lib/ansible/modules/database/mysql/mysql_user.py +++ b/lib/ansible/modules/database/mysql/mysql_user.py @@ -333,8 +333,8 @@ def user_mod(cursor, user, host, host_all, password, encrypted, new_priv, append return changed def user_delete(cursor, user, host, host_all, check_mode): - if module.check_mode: - changed = True + if check_mode: + return True if host_all: hostnames = user_get_hostnames(cursor, user)