lae / ansible-role-proxmox

IaC for Proxmox VE clusters.
MIT License
488 stars 141 forks source link

Feature Request: Allow Specification of Proxmox Version for Installation #256

Open thystips opened 3 weeks ago

thystips commented 3 weeks ago

Hello,

First of all, thank you for maintaining this project, it's been extremely helpful in automating my deployments.

I would like to request a feature that allows users to specify the exact version of Proxmox to install during the setup process. In my specific use case, I deploy tools that are only compatible with certain minor versions of Proxmox. Therefore, being able to define the Proxmox version is crucial to ensure compatibility and avoid potential issues.

Currently, the role installs the latest available version, which may lead to incompatibilities with certain tools or scripts that haven't been updated to work with newer releases. By enabling version specification, users can ensure that their deployments are stable and consistent across different environments.

Thank you for considering this feature.

lae commented 3 weeks ago

This is likely going to be very tricky, I think. I can't think up off the top of my head how one would grab a specific "minor" version from the apt repositories for all relevant packages. If you have any information regarding how to go about this, if upstream PVE even makes it possible (e.g. if old releases are not pruned), that'd be helpful.

thystips commented 3 weeks ago

After checking the PVE repository, it appears that multiple versions are available for each package. This suggests that it should be possible to specify a particular version to install with Ansible.

As a workaround for my specific use case, I could use a custom repository with tailored packages, but this approach is less generalizable. I believe allowing version specification directly in the role would be a more flexible solution.

lae commented 2 weeks ago

Yeah but like, my concern is that there isn't a way to pin all packages to an associated minor version. You can install a specific version of a single package, in our case proxmox-ve^pkgs, but what about its dependencies? For example proxmox-ve 8.2.0 depends on pve-qemu-kvm whose latest is 9.0.2. Pulling proxmox-ve=8.1.0 is still gonna pull pve-qemu-kvm=9.0.2, which sounds like it might cause issues?

thystips commented 2 weeks ago

You're right, version need to be set on proxmox-ve, pve-kernel and pve-qemu-kvm but if a strict version is set for proxmox-ve in _pve_install_packages, pve_extra_packages can be used for other packages without add complexity in role. Is it a better way ?