Open fdcastel opened 2 months ago
Files identified in the description:
plugins/modules/proxmox
If these files are incorrect, please update the component name
section of the description or use the !component
bot command.
cc @Ajpantuso @Thulium-Drake @UnderGreen @joshainglis @karmab @krauthosting click here for bot help
Workaround (for now)
- name: Retrieve information about specific VM by ID
community.general.proxmox_vm_info:
vmid: "{{ lxc_id }}"
type: lxc
register: vm_info_result
- name: "LXC container: convert to template"
community.general.proxmox:
vmid: "{{ lxc_id }}"
state: template
node: "{{ pve_host }}"
api_host: "{{ proxmox.api_host }}"
api_user: "{{ proxmox.api_user }}"
api_password: "{{ proxmox.api_password }}"
when: not vm_info_result.proxmox_vms[0].template
Summary
Setting
state:template
on a LXC that is already a template fails with:This is exactly the same problem fixed in #7791, but now for LXCs (#7791 fixed it only for VMs).
Issue Type
Bug Report
Component Name
proxmox
Ansible Version
Community.general Version
Configuration
OS / Environment
Ubuntu 24.04 LTS Promox VE 8.2.4
Steps to Reproduce
Expected Results
Skip (do not run) the task since it is already in the declared state.
Actual Results
Code of Conduct