crowdstrike.falcon.prevention_policy_precedence module – Set the precedence of Falcon prevention policies
Note
This module is part of the crowdstrike.falcon collection (version 4.15.0).
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install crowdstrike.falcon.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: crowdstrike.falcon.prevention_policy_precedence.
New in crowdstrike.falcon 4.16.0
Synopsis
Sets the order in which Falcon applies the prevention policies of one platform. When a host is in the host groups of more than one policy, the policy with the highest precedence applies.
The API needs the full order of every policy of the platform except
platform_default, so the module reads the current order and sends the full list.The module changes the order only when it differs, so a second run makes no change.
The
platform_defaultpolicy always has the lowest precedence and cannot be ordered.In Flight Control, the policy search also returns the policies of the parent or the child CIDs. The module then reads the CID of the credentials and orders only the policies of that CID.
Requirements
The below requirements are needed on the host that executes this module.
Prevention policies [READ, WRITE] API scope
Sensor download [READ] API scope, only in Flight Control, to read the CID of the credentials
crowdstrike-falconpy >= 1.5.0
python >= 3.12
Parameters
Parameter |
Comments |
|---|---|
The registered result of the crowdstrike.falcon.auth module, or a dictionary containing the access_token and cloud keys. If provided, the client_id, client_secret, member_cid, and cloud options are ignored. Useful when needing to make multiple API calls to avoid rate limiting issues. |
|
The OAuth2 access token to use for authentication. |
|
The CrowdStrike cloud region to use. This can differ from the module’s cloud argument due to autodiscovery. |
|
The CrowdStrike API client ID to use. See the Falcon documentation for more information about API clients. The |
|
The CrowdStrike API secret that corresponds to the client ID. See the Falcon documentation for more information about API clients. The |
|
The CrowdStrike cloud region to use. All clouds are automatically discovered if not specified, except for the The Choices:
|
|
With With Choices:
|
|
Extended headers that are prepended to the default headers dictionary. |
|
The CrowdStrike member CID for MSSP authentication. See the Falcon documentation for more information about API clients. The |
|
The platform of the prevention policies. The value is case-sensitive. Choices:
|
|
The IDs of the prevention policies, highest precedence first. The IDs are compared without regard to case, after leading and trailing spaces are removed. An ID must be in the list only once. The module fails before any change when an ID is not a policy on platform_name, or is the |
|
Custom User-Agent string to use for requests to the API. The user agent string is prepended to the default user agent string ( See RFC 7231 for more information. The |
Attributes
Attribute |
Support |
Description |
|---|---|---|
Support: full |
Can run in check_mode and return changed status prediction without modifying target, if not supported the action will be skipped. |
|
Support: full |
Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode |
|
Platforms: all |
Target OS/families that can be operated against |
See Also
See also
- crowdstrike.falcon.prevention_policy
Manage Falcon prevention policies.
- crowdstrike.falcon.prevention_policy_info
Get information about Falcon prevention policies.
- Prevention Policy API reference
The CrowdStrike API operations that this module uses.
Examples
- name: Give two Windows prevention policies the highest precedence
crowdstrike.falcon.prevention_policy_precedence:
platform_name: Windows
policy_ids:
- "abcdef1234567890abcdef1234567890"
- "1234567890abcdef1234567890abcdef"
- name: Set the full order of the Linux prevention policies
crowdstrike.falcon.prevention_policy_precedence:
platform_name: Linux
enforcement: strict
policy_ids: "{{ linux_policy_ids }}"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
The IDs of the prevention policies of the platform in precedence order, without In check mode, the order that the module would set. Returned: success Sample: |
|
The IDs in precedence order before the change. Returned: success Sample: |