mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-18 16:31:26 -07:00
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
This commit is contained in:
parent
a5ee4b3d1a
commit
11958ec46a
12 changed files with 162 additions and 92 deletions
16
plugins/module_utils/implementations/mysql/user.py
Normal file
16
plugins/module_utils/implementations/mysql/user.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
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("5.7")
|
||||
|
||||
|
||||
def supports_identified_by_password(cursor):
|
||||
version = get_server_version(cursor)
|
||||
return LooseVersion(version) < LooseVersion("8")
|
Loading…
Add table
Add a link
Reference in a new issue