mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-27 10:40:22 -07:00
Do not pass filters to os_group get_group call (#22321)
As default is set to None, the get_group call doesn't find groups on domain 'None'. Only pass filters in case we pass domain_id value.
This commit is contained in:
parent
433829769e
commit
43aef4e868
1 changed files with 4 additions and 1 deletions
|
@ -146,7 +146,10 @@ def main():
|
||||||
|
|
||||||
try:
|
try:
|
||||||
cloud = shade.operator_cloud(**module.params)
|
cloud = shade.operator_cloud(**module.params)
|
||||||
group = cloud.get_group(name, filters={'domain_id': domain_id})
|
if domain_id:
|
||||||
|
group = cloud.get_group(name, filters={'domain_id': domain_id})
|
||||||
|
else:
|
||||||
|
group = cloud.get_group(name)
|
||||||
|
|
||||||
if module.check_mode:
|
if module.check_mode:
|
||||||
module.exit_json(changed=_system_state_change(state, description, group))
|
module.exit_json(changed=_system_state_change(state, description, group))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue