[PR #2775/c9cf6411 backport][stable-3] datadog_event : Adding api_host as an optional parameter #2831
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a backport of PR #2775 as merged into main (c9cf641).
SUMMARY
Users need the ability to define an API endpoint for the datadog_event Ansible module to send data to. By default, it sends to
api.datadog.com
which is not necessarily always the case.This change is to add an optional
api_host
parameter to pass to the module in order for the events to reach the right location.This is related to issue #2774
ISSUE TYPE
COMPONENT NAME
datadog_event
ADDITIONAL INFORMATION
The change mainly targets
plugins/modules/monitoring/datadog/datadog_event.py
to allow users to define datadogapi_host
in their playbooksAs a result of this change, the playbook now would accept
api_host
as an optional parameter for datadog_event module where it takes a string value. Example playbook after this change: