Skip to content

Commit

Permalink
Fix wrong impl for mysql (#210)
Browse files Browse the repository at this point in the history
If 'mariadb' in version info, the db instance should be mariadb(reverse in code) rather than mysql.
  • Loading branch information
int32bit authored Aug 25, 2021
1 parent a1f419d commit 6635906
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/module_utils/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -859,8 +859,8 @@ def get_impl(cursor):
global impl
cursor.execute("SELECT VERSION()")
if 'mariadb' in cursor.fetchone()[0].lower():
from ansible_collections.community.mysql.plugins.module_utils.implementations.mariadb import user as mysqluser
impl = mysqluser
else:
from ansible_collections.community.mysql.plugins.module_utils.implementations.mysql import user as mariauser
from ansible_collections.community.mysql.plugins.module_utils.implementations.mariadb import user as mariauser
impl = mariauser
else:
from ansible_collections.community.mysql.plugins.module_utils.implementations.mysql import user as mysqluser
impl = mysqluser

0 comments on commit 6635906

Please sign in to comment.