From 9562e9de569684b7b3fa6eb0dc07900588c28252 Mon Sep 17 00:00:00 2001 From: Ahmed AbdelHalim Date: Fri, 12 Sep 2025 16:23:12 +0200 Subject: Fix testing ansible role on 2.19.2 The issue is that regex_match either returns a string or none which was implicitly converted to a boolean, this breaks on 2.19.2+ This ensure compatibility with newer versions. --- roles/ansible/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/ansible/tasks/main.yml b/roles/ansible/tasks/main.yml index fe7611ae..de04692e 100644 --- a/roles/ansible/tasks/main.yml +++ b/roles/ansible/tasks/main.yml @@ -2,7 +2,7 @@ - name: "Validate version format" ansible.builtin.assert: that: - - item | regex_search('^[0-9]+\\.[0-9]+\\.[0-9]+$') + - item | regex_search('^[0-9]+\\.[0-9]+\\.[0-9]+$') is not none msg: "Version '{{ item }}' must be in major.minor.patch format" with_items: - "{{ (ansible_core_versions + [ansible_core_default_version]) | unique }}" -- cgit v1.2.3