[PR #9809/e39320c3 backport][stable-10] proxmox: fix status getter (#9817)
proxmox: fix status getter (#9809)
* proxmox: fix status getter
get_lxc_status was missing a selection of the 'status' key
* proxmox: add changelog fragment
* proxmox: fix changelog fragment
(cherry picked from commit e39320c354
)
Co-authored-by: JL Euler <Lithimlin@users.noreply.github.com>
stable-10
parent
91d515bd1e
commit
195ac4d7e6
|
@ -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).
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue