From 267e039342a1f5c1bfb9696d7c9c23e203ba5180 Mon Sep 17 00:00:00 2001 From: Laurent Indermuehle Date: Mon, 29 Apr 2024 15:09:51 +0200 Subject: [PATCH] Fix test for MariaDB --- plugins/modules/mysql_replication.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/modules/mysql_replication.py b/plugins/modules/mysql_replication.py index 39c16f0..fe40446 100644 --- a/plugins/modules/mysql_replication.py +++ b/plugins/modules/mysql_replication.py @@ -560,7 +560,11 @@ def main(): elif mode == "getreplica": status = get_replica_status(cursor, connection_name, channel, replica_term) - if status and "Slave_IO_Running" in status and "Slave_SQL_Running" in status: + # MySQL 8.0 uses Replica_... + # MariaDB 10.6 uses Slave_... + if status and ( + "Slave_IO_Running" in status or + "Replica_IO_Running" in status): status['Is_Replica'] = True else: status = dict(Is_Replica=False, msg="Server is not configured as mysql replica")