mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
cloudstack: added fetch_list=True where appropriate (#40233)
This commit is contained in:
@@ -427,10 +427,11 @@ class AnsibleCloudStackHost(AnsibleCloudStack):
|
||||
name = self.module.params.get('name')
|
||||
args = {
|
||||
'zoneid': self.get_zone(key='id'),
|
||||
'fetch_list': True,
|
||||
}
|
||||
res = self.query_api('listHosts', **args)
|
||||
if res:
|
||||
for h in res['host']:
|
||||
for h in res:
|
||||
if name in [h['ipaddress'], h['name']]:
|
||||
self.host = h
|
||||
return self.host
|
||||
|
||||
Reference in New Issue
Block a user