community.mysql/plugins/module_utils/implementations/mariadb/user.py
Jorge Rodriguez (A.K.A. Tiriel) 11958ec46a
Handle divergences between MySQL and MariaDB (#103)
* Initial attempt

* First functional approach

* Remove unused imports

* Add dychotomy handling for mysql_replication

* Fix cursor lookup

* Fix sanity tests

* Cleanup implementation conditional import

* Fix unit tests

* Fix conditional import to satisfy both sanity and integration tests

* Add changelog fragment
2021-03-16 09:15:19 +01:00

15 lines
420 B
Python

from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from distutils.version import LooseVersion
from ansible_collections.community.mysql.plugins.module_utils.mysql import get_server_version
def use_old_user_mgmt(cursor):
version = get_server_version(cursor)
return LooseVersion(version) < LooseVersion("10.2")
def supports_identified_by_password(cursor):
return True