splunk.es.splunk_notes module – Manage notes for findings, investigations, and response plan tasks
Note
This module is part of the splunk.es collection (version 5.1.0).
You might already have this collection installed if you are using the ansible package.
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 splunk.es.
To use it in a playbook, specify: splunk.es.splunk_notes.
New in splunk.es 5.1.0
Synopsis
This module allows for creation, update, and deletion of notes in Splunk Enterprise Security.
Notes can be created for findings, investigations, or response plan tasks.
Use
target_typeto specify where the note should be attached.When
state=presentwithoutnote_id, a new note is created.When
state=presentwithnote_id, the existing note is updated.When
state=absentwithnote_id, the note is deleted.Note creation (without
note_id) is NOT idempotent. Each call creates a new note, even if the content is identical. This is by design, as notes are meant to be additive and multiple notes with the same content may be intentional.Note updates (with
note_id) ARE idempotent. The module compares the existing note’s content with the desired state and only updates if there are differences.
Note
This module has a corresponding action plugin.
Parameters
Parameter |
Comments |
|---|---|
The app portion of the Splunk API path. Override this if your environment uses a different app name. Default: |
|
The namespace portion of the Splunk API path. Override this if your environment uses a different namespace. Default: |
|
The user portion of the Splunk API path. Override this if your environment requires a different user context. Default: |
|
The content/body of the note. Required when |
|
The reference ID of the finding to attach the note to. Required when Format is typically |
|
The investigation UUID. Required when |
|
The ID of an existing note. Required when updating or deleting a note. When When |
|
The ID of the phase containing the task. Required when |
|
The ID of the applied response plan. Required when |
|
The desired state of the note. Use Use Choices:
|
|
The type of object to attach the note to. Use Use Use Choices:
|
|
The ID of the task to attach the note to. Required when |
Examples
# Create a note on a finding
- name: Add note to a finding
splunk.es.splunk_notes:
target_type: finding
finding_ref_id: "2008e99d-af14-4fec-89da-b9b17a81820a@@notable@@time1768225865"
content: "Initial investigation shows suspicious activity from external IP."
# Create a note on an investigation
- name: Add note to an investigation
splunk.es.splunk_notes:
target_type: investigation
investigation_ref_id: "590afa9c-23d5-4377-b909-cd2cfa1bc0f1"
content: "Escalating to security team for further analysis."
# Create a note on a response plan task
- name: Add note to a response plan task
splunk.es.splunk_notes:
target_type: response_plan_task
investigation_ref_id: "590afa9c-23d5-4377-b909-cd2cfa1bc0f1"
response_plan_id: "b9ef7dce-6dcd-4900-b5d5-982fc194554a"
phase_id: "phase-001"
task_id: "task-001"
content: "Completed isolation of affected systems."
# Update an existing note
- name: Update a note on a finding
splunk.es.splunk_notes:
target_type: finding
finding_ref_id: "2008e99d-af14-4fec-89da-b9b17a81820a@@notable@@time1768225865"
note_id: "note-abc123"
content: "Updated analysis: confirmed malicious activity."
# Delete a note from an investigation
- name: Delete a note from an investigation
splunk.es.splunk_notes:
target_type: investigation
investigation_ref_id: "590afa9c-23d5-4377-b909-cd2cfa1bc0f1"
note_id: "note-abc123"
state: absent
# Create note with custom API configuration
- name: Add note with custom API path
splunk.es.splunk_notes:
target_type: investigation
investigation_ref_id: "590afa9c-23d5-4377-b909-cd2cfa1bc0f1"
content: "Note content here"
api_namespace: "{{ es_namespace | default('servicesNS') }}"
api_user: "{{ es_user | default('nobody') }}"
api_app: "{{ es_app | default('missioncontrol') }}"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Whether any changes were made. Returned: always Sample: |
|
Message describing the result. Returned: always Sample: |
|
The note result containing before/after states. Returned: always Sample: |
|
The note state after module execution. Returned: when state is present |
|
The content of the note. Returned: success |
|
The unique identifier of the note. Returned: success |
|
The note state before module execution (if existed). Returned: when note existed (update/delete operations) |