Skip to content

response_policy

Create, update, enable, disable and delete Falcon Real Time Response policies. The same task creates the Real Time Response policy when it is missing, updates it when

Added in version 4.15.0

ParameterTypeRequiredDefaultDescription
custom_scriptsboolNoWhether custom scripts can run on the hosts of the policy. The API setting ID is C(CustomScripts), in the C(Scripts) category. Available on Windows, Mac and Linux. When not set, the module does not change it.
descriptionstrNoThe description of the Real Time Response policy. An empty string clears the description. When not set, the module does not change the description.
enabledboolNoWhether the Real Time Response policy is enabled. A new policy is disabled unless this is C(true). When not set, the module does not change it.
exec_commandboolNoWhether the C(run) command is allowed. The API setting ID is C(ExecCommand), in the C(High risk commands) category. Available on Windows, Mac and Linux. When not set, the module does not change it.
falcon_scriptsboolNoWhether Falcon scripts can run on the hosts of the policy. The API setting ID is C(FalconScripts), in the C(Scripts) category. Available on Windows only. The API says that this setting requires custom scripts to be enabled. The module does not check it. When not set, the module does not change it.
get_commandboolNoWhether the C(get) command is allowed. The API setting ID is C(GetCommand), in the C(High risk commands) category. Available on Windows, Mac and Linux. When not set, the module does not change it.
host_groupslistNoThe IDs of the host groups to assign the Real Time Response policy to. The IDs are compared without regard to case. An ID that is in the list more than once counts once. The module fails before any change when a host group to add does not exist. When not set, the module does not change the host groups of the policy. Ignored with I(state=absent).
memdump_commandboolNoWhether the C(memdump) command is allowed. The API setting ID is C(MemDumpCommand), in the C(High risk commands) category. Available on Windows only. When not set, the module does not change it.
namestrNoThe name of the Real Time Response policy. The module finds an existing policy by this exact name on the platform in I(platform_name), without regard to case. The module does not change the name of an existing policy. A name that differs only in case finds the same policy. Requires I(platform_name). Mutually exclusive with I(policy_id).
platform_namestrNoThe platform of the Real Time Response policy. The value is case-sensitive. A name is unique only for each platform, so the module uses the platform to find the policy by I(name). The platform of an existing policy cannot change. Required with I(name).
policy_idstrNoThe ID of an existing Real Time Response policy. The ID is compared without regard to case. With I(state=present), the module fails when the ID does not exist. Mutually exclusive with I(name) and I(platform_name).
purge_host_groupsboolNofalseIf I(purge_host_groups=true) and I(host_groups) is set, the module removes the host groups of the policy that are not in I(host_groups). If I(host_groups) is not set, the module does not change the host groups, even if I(purge_host_groups=true). With I(host_groups=[]) and I(purge_host_groups=true), the module removes all the host groups of the policy.
put_and_run_commandboolNoWhether the C(put-and-run) command is allowed. The API setting ID is C(PutAndRunCommand), in the C(High risk commands) category. Available on Windows and Mac. When not set, the module does not change it.
put_commandboolNoWhether the C(put) command is allowed. The API setting ID is C(PutCommand), in the C(High risk commands) category. Available on Windows, Mac and Linux. When not set, the module does not change it.
real_time_functionalityboolNoWhether Real Time Response is on for the hosts of the policy. The API setting ID is C(RealTimeFunctionality), in the C(Enable/Disable) category. Available on Windows, Mac and Linux. When not set, the module does not change it.
statestrNopresentThe desired state of the Real Time Response policy. With I(state=absent), the module disables an enabled policy before it deletes it, because the API does not delete an enabled policy.
xmemdump_commandboolNoWhether the C(xmemdump) command is allowed. The API setting ID is C(XMemDumpCommand), in the C(High risk commands) category. Available on Windows only. When not set, the module does not change it.
- name: Create an enabled Linux Real Time Response policy
crowdstrike.falcon.response_policy:
name: "Example response policy"
platform_name: Linux
description: "Managed by Ansible"
enabled: true
real_time_functionality: true
custom_scripts: true
put_command: true
- name: Create a Windows Real Time Response policy that allows Falcon scripts
crowdstrike.falcon.response_policy:
name: "Example Windows response policy"
platform_name: Windows
real_time_functionality: true
custom_scripts: true
falcon_scripts: true
- name: Turn off the get command of the Linux policy
crowdstrike.falcon.response_policy:
name: "Example response policy"
platform_name: Linux
get_command: false
- name: Assign the policy to two host groups
crowdstrike.falcon.response_policy:
name: "Example response policy"
platform_name: Linux
host_groups:
- "abcdef1234567890abcdef1234567890"
- "1234567890abcdef1234567890abcdef"
- name: Set the exact host groups of the policy and remove the others
crowdstrike.falcon.response_policy:
name: "Example response policy"
platform_name: Linux
host_groups:
- "abcdef1234567890abcdef1234567890"
purge_host_groups: true
- name: Delete the policy by name and platform
crowdstrike.falcon.response_policy:
name: "Example response policy"
platform_name: Linux
state: absent
- name: Delete a Real Time Response policy by ID
crowdstrike.falcon.response_policy:
policy_id: "12345678901234567890abcdef123456"
state: absent
KeyTypeDescription
response_policydictThe Real Time Response policy after the change, read again from the API. In check mode, the current policy, or the wanted values when the policy does not exist.