From 6e63ff650692b3c0ea32ba57c44f510e4762e522 Mon Sep 17 00:00:00 2001 From: Lucas Roth Date: Mon, 17 Mar 2025 11:04:50 +0100 Subject: [PATCH] Make parsing of mysql_cli_version variable from daemon --version output more generic by introducing regex parsing --- tasks/configure.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/configure.yml b/tasks/configure.yml index 50714c14..e452e6dd 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -10,7 +10,7 @@ - name: Extract MySQL version ansible.builtin.set_fact: mysql_cli_version: >- - {{ (mysql_cli_version.stdout | split(' '))[('mariadb' in (mysql_cli_version.stdout | lower)) | ternary(5, 3)][:-1] }} + {{ mysql_cli_version.stdout | regex_search('\d+\.\d+\.\d+(-[a-zA-Z]+)?') }} - name: Copy my.cnf global MySQL configuration. ansible.builtin.template: