-
-
Save evgeni/8102eef7e1b53bc4a17d3d653f538378 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git plugins/modules/external_usergroup.py plugins/modules/external_usergroup.py | |
index f33f2447..b135e2be 100644 | |
--- plugins/modules/external_usergroup.py | |
+++ plugins/modules/external_usergroup.py | |
@@ -89,17 +89,17 @@ def main(): | |
module = ForemanExternalUsergroupModule( | |
foreman_spec=dict( | |
name=dict(required=True), | |
- usergroup=dict(required=True), | |
+ usergroup=dict(required=True, type='entity'), | |
auth_source=dict(required=True, aliases=['auth_source_ldap'], type='entity', flat_name='auth_source_id', resource_type='auth_sources'), | |
auth_source_ldap=dict(type='entity', invisible=True, flat_name='auth_source_id'), | |
auth_source_external=dict(type='entity', invisible=True, flat_name='auth_source_id'), | |
), | |
) | |
- params = {"usergroup_id": module.foreman_params.pop('usergroup')} | |
entity = None | |
with module.api_connection(): | |
+ params = module.scope_for('usergroup') | |
# There is no way to find by name via API search, so we need | |
# to iterate over all external user groups of a given usergroup | |
for external_usergroup in module.list_resource("external_usergroups", params=params): |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment