cloudstack: fix vm not found by displayname

pull/10615/merge
Rene Moser 10 years ago committed by James Cammarata
parent 0a26b149fc
commit 822c2c0cd3

@ -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…
Cancel
Save