--- # ============================================================================= # playbooks/snapshot_pre.yml # Pre-patch snapshots for Linux guest VMs via hypervisor API. # Targets linux_hosts only — snapshots taken per-VM before patching. # XCP-NG: uses XO REST API (xcpng_vm_uuid required per host) # Proxmox: uses community.general.proxmox_snap (proxmox_vmid required per host) # Baremetal: snapshot tasks skipped automatically (no hypervisor_type match) # ============================================================================= - name: Bootstrap — ensure Python is available hosts: linux_hosts gather_facts: false tasks: - ansible.builtin.import_tasks: ../roles/preflight/tasks/bootstrap.yml - name: Pre-patch snapshot hosts: linux_hosts gather_facts: true roles: - snapshot