mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
cloudstack: added fetch_list=True where appropriate (#40233)
This commit is contained in:
@@ -211,7 +211,8 @@ class AnsibleCloudStackRouter(AnsibleCloudStack):
|
||||
'projectid': self.get_project(key='id'),
|
||||
'account': self.get_account(key='name'),
|
||||
'domainid': self.get_domain(key='id'),
|
||||
'listall': True
|
||||
'listall': True,
|
||||
'fetch_list': True,
|
||||
}
|
||||
|
||||
if self.module.params.get('zone'):
|
||||
@@ -219,7 +220,7 @@ class AnsibleCloudStackRouter(AnsibleCloudStack):
|
||||
|
||||
routers = self.query_api('listRouters', **args)
|
||||
if routers:
|
||||
for r in routers['router']:
|
||||
for r in routers:
|
||||
if router.lower() in [r['name'].lower(), r['id']]:
|
||||
self.router = r
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user