diff --git a/changelogs/fragments/9809-proxmox-fix-status-getter.yml b/changelogs/fragments/9809-proxmox-fix-status-getter.yml new file mode 100644 index 0000000000..eef4ab072e --- /dev/null +++ b/changelogs/fragments/9809-proxmox-fix-status-getter.yml @@ -0,0 +1,2 @@ +bugfixes: + - proxmox - add missing key selection of ``'status'`` key to ``get_lxc_status`` (https://github.com/ansible-collections/community.general/issues/9696, https://github.com/ansible-collections/community.general/pull/9809). diff --git a/plugins/modules/proxmox.py b/plugins/modules/proxmox.py index 4f25b90ad0..035de02521 100644 --- a/plugins/modules/proxmox.py +++ b/plugins/modules/proxmox.py @@ -1655,7 +1655,7 @@ class ProxmoxLxcAnsible(ProxmoxAnsible): proxmox_node = self.proxmox_api.nodes(node_name) except Exception as e: self.module.fail_json(msg="Unable to retrieve node information: %s" % e) - return getattr(proxmox_node, self.VZ_TYPE)(vmid).status.current.get() + return getattr(proxmox_node, self.VZ_TYPE)(vmid).status.current.get()['status'] def format_vm_identifier(self, vmid, hostname): if vmid and hostname: