Add dychotomy handling for mysql_replication

This commit is contained in:
Jorge-Rodriguez 2021-03-07 16:04:10 +02:00
parent 290795f560
commit 4b08069061
No known key found for this signature in database
GPG key ID: 43153D1EFD8F7D90
3 changed files with 21 additions and 19 deletions

View file

@ -0,0 +1,7 @@
from ansible_collections.community.mysql.plugins.module_utils.mysql import get_server_version
from distutils.version import LooseVersion
def uses_replica_terminology(cursor):
"""Checks if REPLICA must be used instead of SLAVE"""
return LooseVersion(get_server_version(cursor)) >= LooseVersion('10.5.1')