From dafb39da2e35d11803682fab6aa9feeabd24825a Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Wed, 16 Dec 2015 14:07:17 -0800 Subject: [PATCH] Account for mariadb versioning --- lib/ansible/modules/database/mysql/mysql_user.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/database/mysql/mysql_user.py b/lib/ansible/modules/database/mysql/mysql_user.py index ff45dd55ac..754fd14aac 100644 --- a/lib/ansible/modules/database/mysql/mysql_user.py +++ b/lib/ansible/modules/database/mysql/mysql_user.py @@ -182,10 +182,14 @@ def server_version_check(cursor): version_str = result[0] version = version_str.split('.') + # Currently we have no facility to handle new-style password update on + # mariadb and the old-style update continues to work + if version_str.lower().endswith('mariadb'): + return True if (int(version[0]) <= 5 and int(version[1]) < 7): - return True + return True else: - return False + return False def user_exists(cursor, user, host, host_all): if host_all: