Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix config overrides to main #57

Merged
merged 4 commits into from
Dec 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions plugins/modules/sentinelone_config_overrides.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type


DOCUMENTATION = '''
---
module: sentinelone_config_overrides
Expand Down Expand Up @@ -276,6 +277,13 @@ def get_current_config_override(self, module: AnsibleModule):
query_options.append("versionOption=SPECIFIC")
query_options.append(f"agentVersions={self.agent_version}")

if self.config_override_name is None or self.config_override_name == "":
query_options.append(f"name__like={self.config_override_name}")
else:
# Encode the parameters
encoded_params_name_like = quote_plus(self.config_override_name)
query_options.append(f"name__like={encoded_params_name_like}")

query_uri = '&'.join(query_options)
api_url = f"{self.api_endpoint_config_overrides}?{query_uri}"
response = self.api_call(module, api_url, error_msg=error_msg)
Expand Down
Loading