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
This commit is contained in:
pguermo 2019-08-13 19:22:17 +02:00 committed by Felix Fontein
parent 21863d48f3
commit 8923d13537
2 changed files with 3 additions and 1 deletions

View file

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

View file

@ -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):