From 8e84ba71ae5565b8ec99c12807c7bf0a5f979527 Mon Sep 17 00:00:00 2001 From: Lee H Date: Thu, 14 Jan 2016 08:53:22 -0500 Subject: [PATCH] - fix check_mode test to avoid errors - correct test mode check to ensure it returns and doesnt apply changes (via jmainguy) --- lib/ansible/modules/database/mysql/mysql_user.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)