Skip the Checkmk update when already current

This commit is contained in:
Vincent Stuyck
2026-10-30 19:06:14 +01:00
parent c409e38d4e
commit 093589732e
+11
View File
@@ -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