mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-08-01 04:34:29 +00:00
fix os_user_role for groups in multidomain context
This fixes searching for a group in multi-domain context by passing the domain_id in the call to get_groups. original github PR: https://github.com/ansible/ansible/pull/62858 Change-Id: Ia2216728c15cc9d9a5e29bfe6b9fc63d2c6982ce Task: 38375 Story: 2007209
This commit is contained in:
@@ -156,7 +156,10 @@ def main():
|
|||||||
module.fail_json(msg="User %s is not valid" % user)
|
module.fail_json(msg="User %s is not valid" % user)
|
||||||
filters['user'] = u['id']
|
filters['user'] = u['id']
|
||||||
if group:
|
if group:
|
||||||
g = cloud.get_group(group)
|
if domain:
|
||||||
|
g = cloud.get_group(group, domain_id=filters['domain'])
|
||||||
|
else:
|
||||||
|
g = cloud.get_group(group)
|
||||||
if g is None:
|
if g is None:
|
||||||
module.fail_json(msg="Group %s is not valid" % group)
|
module.fail_json(msg="Group %s is not valid" % group)
|
||||||
filters['group'] = g['id']
|
filters['group'] = g['id']
|
||||||
|
|||||||
Reference in New Issue
Block a user