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:
@@ -218,13 +218,14 @@ class AnsibleCloudStackUser(AnsibleCloudStack):
|
||||
if not self.user:
|
||||
args = {
|
||||
'domainid': self.get_domain('id'),
|
||||
'fetch_list': True,
|
||||
}
|
||||
|
||||
users = self.query_api('listUsers', **args)
|
||||
|
||||
if users:
|
||||
user_name = self.module.params.get('username')
|
||||
for u in users['user']:
|
||||
for u in users:
|
||||
if user_name.lower() == u['username'].lower():
|
||||
self.user = u
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user