- name: Get all snapshots community.proxmox.proxmox_snap_info: api_host: "{{ proxmox_host }}" api_user: "{{ proxmox_user }}" api_token_id: "{{ proxmox_token_id }}" api_token_secret: "{{ proxmox_token_secret }}" vmid: "{{ vmid }}" register: snapshot_info delegate_to: localhost retries: 3 delay: 10 until: snapshot_info is succeeded - name: Delete all snapshots community.proxmox.proxmox_snap: api_host: "{{ proxmox_host }}" api_user: "{{ proxmox_user }}" api_token_id: "{{ proxmox_token_id }}" api_token_secret: "{{ proxmox_token_secret }}" vmid: "{{ vmid }}" state: absent snapname: "{{ item.name }}" loop: "{{ snapshot_info.snapshots }}" when: item.name != "current" delegate_to: localhost retries: 3 delay: 10 until: item is succeeded timeout: 300