From 6f7cd5c30719657b720be15fd454d6c764bdc7cc Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Thu, 30 Apr 2015 11:40:04 -0400 Subject: [PATCH] Set default for mysql_user config_file The default value set by the module was a value of None for the config_file parameter, which propogates into the connect method call overriding the stated default in the method. Instead, the default should be set with-in the parameter specification so the file check is not requested to check None. --- lib/ansible/modules/database/mysql/mysql_user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/database/mysql/mysql_user.py b/lib/ansible/modules/database/mysql/mysql_user.py index c92a63c1ae5..ddefdcbcfa8 100644 --- a/lib/ansible/modules/database/mysql/mysql_user.py +++ b/lib/ansible/modules/database/mysql/mysql_user.py @@ -385,7 +385,7 @@ def main(): append_privs=dict(type="bool", default="no"), check_implicit_admin=dict(default=False), update_password=dict(default="always", choices=["always", "on_create"]), - config_file=dict(default=None), + config_file=dict(default="~/.my.cnf"), ) ) login_user = module.params["login_user"]