Skip to content

Commit e39320c

Browse files
authored
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
1 parent cf147b9 commit e39320c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
bugfixes:
2+
- 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).

plugins/modules/proxmox.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1655,7 +1655,7 @@ def get_lxc_status(self, vmid, node_name):
16551655
proxmox_node = self.proxmox_api.nodes(node_name)
16561656
except Exception as e:
16571657
self.module.fail_json(msg="Unable to retrieve node information: %s" % e)
1658-
return getattr(proxmox_node, self.VZ_TYPE)(vmid).status.current.get()
1658+
return getattr(proxmox_node, self.VZ_TYPE)(vmid).status.current.get()['status']
16591659

16601660
def format_vm_identifier(self, vmid, hostname):
16611661
if vmid and hostname:

0 commit comments

Comments
 (0)