Skip to content

Conversation

@tinux-it
Copy link

SUMMARY

Add functionality to the proxmox_snap module to allow users to list all snapshots for gven VM or container. This information can then be used by a user to delete specific snapshots using the state: absent calls.

Issue: #229

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

proxmox_snap

ADDITIONAL INFORMATION

Currently, the proxmox_snap module supports creating, removing, and rolling back snapshots, but it does not provide a built-in way to list existing snapshots. Adding list_snapshots: true allows a task to return all snapshots for a VM or container in a structured format. This list can then be used to remove multiple specific snapshots for a VM or container.

Example usage:

- name: List all snapshots for container or VM
  community.proxmox.proxmox_snap:
    api_user: root@pam
    api_password: password123
    api_host: node1
    vmid: 100
    list_snapshots: true

@Thulium-Drake
Copy link
Collaborator

Hi there! Thanks for this work!

It's convention in Ansible to have modules that retrieve info be a stuff_info module, can you move this logic over to a proxmox_snap_info module?

The reason behind this is to separate modules that could make changes and those that can't make changes by name. Which makes making mistakes a bit harder ;-)

Thanks! 🚀

@codecov
Copy link

codecov bot commented Dec 1, 2025

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.61%. Comparing base (059dda2) to head (4eb5d8e).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
plugins/modules/proxmox_snap.py 0.00% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #230      +/-   ##
==========================================
- Coverage   69.65%   69.61%   -0.05%     
==========================================
  Files          77       77              
  Lines        8879     8885       +6     
  Branches     1811     1812       +1     
==========================================
  Hits         6185     6185              
- Misses       2406     2411       +5     
- Partials      288      289       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants