Fix cursor lookup

This commit is contained in:
Jorge-Rodriguez 2021-03-07 17:56:24 +02:00
parent 4b08069061
commit 6e175d8166
No known key found for this signature in database
GPG key ID: 43153D1EFD8F7D90

View file

@ -485,7 +485,7 @@ def main():
module.fail_json(msg="unable to find %s. Exception message: %s" % (config_file, to_native(e)))
cursor.execute("SELECT VERSION()")
if 'mariadb' in cursor.fetchone()[0].lower():
if 'mariadb' in cursor.fetchone()["VERSION()"].lower():
from ansible_collections.community.mysql.plugins.module_utils.implementations.mariadb import replication as impl
else:
from ansible_collections.community.mysql.plugins.module_utils.implementations.mysql import replication as impl