From ff4fa6ac29c01135168b4289c99df198ea2a4b31 Mon Sep 17 00:00:00 2001 From: alex lustenberg Date: Thu, 17 Aug 2017 12:00:26 -0400 Subject: [PATCH] fix for empty hostnames in mysql users (#20523) --- 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 21d21256451..9ac731af680 100644 --- a/lib/ansible/modules/database/mysql/mysql_user.py +++ b/lib/ansible/modules/database/mysql/mysql_user.py @@ -446,7 +446,7 @@ def privileges_get(cursor, user, host): return x for grant in grants: - res = re.match("GRANT (.+) ON (.+) TO '.*'@'.+'( IDENTIFIED BY PASSWORD '.+')? ?(.*)", grant[0]) + res = re.match("GRANT (.+) ON (.+) TO '.*'@'.*'( IDENTIFIED BY PASSWORD '.+')? ?(.*)", grant[0]) if res is None: raise InvalidPrivsError('unable to parse the MySQL grant string: %s' % grant[0]) privileges = res.group(1).split(", ")