cloudstack: fix vm not found by displayname
This commit is contained in:
parent
0a26b149fc
commit
822c2c0cd3
1 changed files with 1 additions and 1 deletions
|
@ -119,7 +119,7 @@ class AnsibleCloudStack:
|
|||
vms = self.cs.listVirtualMachines(**args)
|
||||
if vms:
|
||||
for v in vms['virtualmachine']:
|
||||
if vm in [ v['name'], v['id'] ]:
|
||||
if vm in [ v['displayname'], v['name'], v['id'] ]:
|
||||
self.vm_id = v['id']
|
||||
return self.vm_id
|
||||
self.module.fail_json(msg="Virtual machine '%s' not found" % vm)
|
||||
|
|
Loading…
Reference in a new issue