crowdstrike.falcon.maintenance_token lookup – fetch maintenance token
Note
This lookup plugin is part of the crowdstrike.falcon collection (version 4.7.0).
To install it, use: ansible-galaxy collection install crowdstrike.falcon
.
You need further requirements to be able to use this lookup plugin,
see Requirements for details.
To use it in a playbook, specify: crowdstrike.falcon.maintenance_token
.
New in crowdstrike.falcon 4.4.0
Synopsis
This lookup returns a maintenance token which can be used for uninstalls and other maintenance operations not done by the Falcon platform.
Requirements
The below requirements are needed on the local controller node that executes this lookup.
Sensor update policies [WRITE] API scope
crowdstrike-falconpy >= 1.3.0
python >= 3.6
Terms
Parameter |
Comments |
---|---|
The host ID (AID) for which the maintenance token should be fetched. If |
Keyword parameters
This describes keyword parameters of the lookup. These are the values key1=value1
, key2=value2
and so on in the following
examples: lookup('crowdstrike.falcon.maintenance_token', key1=value1, key2=value2, ...)
and query('crowdstrike.falcon.maintenance_token', key1=value1, key2=value2, ...)
Parameter |
Comments |
---|---|
Retrieve a bulk maintenance token. Choices:
|
|
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:
|
|
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 |
|
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 |
Notes
Note
When keyword and positional parameters are used together, positional parameters must be listed before keyword parameters:
lookup('crowdstrike.falcon.maintenance_token', term1, term2, key1=value1, key2=value2)
andquery('crowdstrike.falcon.maintenance_token', term1, term2, key1=value1, key2=value2)
Examples
- name: Print maintenance token for a specific host
ansible.builtin.debug:
msg: "{{ lookup('crowdstrike.falcon.maintenance_token', '12345678901234567890') }}"
- name: Print maintenance token for multiple hosts
ansible.builtin.debug:
msg: "{{ lookup('crowdstrike.falcon.maintenance_token', '12345678901234567890', '09876543210987654321') }}"
- name: Print bulk maintenance token
ansible.builtin.debug:
msg: "{{ lookup('crowdstrike.falcon.maintenance_token', bulk=true) }}"
Return Value
Key |
Description |
---|---|
One or more maintenance tokens. Returned: success |