create a snapshot before the update starts

This commit is contained in:
Vincent Stuyck
2026-03-15 04:29:31 +01:00
parent e35c1cbf3c
commit 21b3b528cf
4 changed files with 31 additions and 1 deletions
+15
View File
@@ -23,6 +23,21 @@
ansible.builtin.debug:
var: checkmk_version.stdout
- name: Snapshot VM before update
become: false
delegate_to: localhost
community.proxmox.proxmox_snap:
api_host: "{{ proxmox_api_host }}"
api_user: "{{ proxmox_api_user }}"
api_token_id: "{{ proxmox_api_token_id }}"
api_token_secret: "{{ proxmox_api_token_secret }}"
validate_certs: false
hostname: "{{ inventory_hostname_short }}"
snapname: "checkmk_{{ checkmk_version.stdout | replace('.', '_') | replace('-', '_') }}"
description: "Pre-update snapshot before checkmk {{ checkmk_version.stdout }}"
timeout: 120
state: present
- name: Install new checkmk version
vars:
filename: "check-mk-raw-{{ checkmk_version.stdout }}_0.{{ ansible_facts.lsb.codename }}_amd64.deb"