From 093589732e6fa8216a31a3292287f00615c47629 Mon Sep 17 00:00:00 2001 From: Vincent Stuyck Date: Fri, 30 Oct 2026 19:06:14 +0100 Subject: [PATCH] Skip the Checkmk update when already current --- playbooks/update-checkmk.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/playbooks/update-checkmk.yml b/playbooks/update-checkmk.yml index 31e8717..5df41b0 100644 --- a/playbooks/update-checkmk.yml +++ b/playbooks/update-checkmk.yml @@ -32,6 +32,17 @@ become: true tasks: + - name: Get current checkmk version + become: false + register: current_version + changed_when: false + ansible.builtin.command: omd version -b + + # omd appends the edition to the version (e.g. 2.4.0p12.cre), the git tag doesn't + - name: Stop when checkmk is up to date + when: current_version.stdout | regex_replace('[.][a-z]+$', '') == checkmk_version + ansible.builtin.meta: end_host + - name: Snapshot VM before update become: false delegate_to: localhost