proxmox_kvm: While a VM is beeing created, vm has no name item (#58196)

* While a VM is beeing created, vm as no name attribute

* Add changelogs fragment
pull/60505/head
pguermo 5 years ago committed by Felix Fontein
parent 21863d48f3
commit 8923d13537

@ -0,0 +1,2 @@
bugfixes:
- proxmox_kvm - fixed issue when vm has not yet a name item (https://github.com/ansible/ansible/issues/58194)

@ -604,7 +604,7 @@ def get_nextvmid(module, proxmox):
def get_vmid(proxmox, name):
return [vm['vmid'] for vm in proxmox.cluster.resources.get(type='vm') if vm['name'] == name]
return [vm['vmid'] for vm in proxmox.cluster.resources.get(type='vm') if vm.get('name') == name]
def get_vm(proxmox, vmid):

Loading…
Cancel
Save