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
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
custom_scripts | bool | No | Whether 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. | |
description | str | No | The description of the Real Time Response policy. An empty string clears the description. When not set, the module does not change the description. | |
enabled | bool | No | Whether 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_command | bool | No | Whether 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_scripts | bool | No | Whether 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_command | bool | No | Whether 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_groups | list | No | The 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_command | bool | No | Whether 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. | |
name | str | No | The 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_name | str | No | The 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_id | str | No | The 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_groups | bool | No | false | If 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_command | bool | No | Whether 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_command | bool | No | Whether 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_functionality | bool | No | Whether 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. | |
state | str | No | present | The 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_command | bool | No | Whether 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. |
Examples
Section titled “Examples”- 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: absentReturn Values
Section titled “Return Values”| Key | Type | Description |
|---|---|---|
response_policy | dict | The 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. |