.. _splunk.es.splunk_response_plan_execution_module: **************************************** splunk.es.splunk_response_plan_execution **************************************** **Apply response plans to investigations and manage tasks** Version added: 5.1.0 .. contents:: :local: :depth: 1 Synopsis -------- - This module applies or removes response plans from Splunk Enterprise Security investigations. - It also manages task lifecycle within applied response plans (start, end, change owner). - The ``response_plan`` parameter accepts either a UUID or a name. - When ``state=present``, the response plan is applied to the investigation. - When ``state=absent``, the response plan is removed from the investigation. - Use the ``tasks`` parameter to manage individual task statuses and owners within the applied plan. Parameters ---------- .. raw:: html
Parameter Choices/Defaults Comments
api_app
string
Default:
"missioncontrol"
The app portion of the Splunk API path.
Override this if your environment uses a different app name.
api_namespace
string
Default:
"servicesNS"
The namespace portion of the Splunk API path.
Override this if your environment uses a different namespace.
api_user
string
Default:
"nobody"
The user portion of the Splunk API path.
Override this if your environment requires a different user context.
investigation_ref_id
string / required
The investigation UUID to apply or manage response plans.
This is the unique identifier of the investigation in Splunk ES.
response_plan
string / required
The response plan template to apply or remove.
Accepts either a UUID (e.g., "2dc5530d-8bb0-4a4f-9b53-74745bf4ea6a") or a name (e.g., "Incident Response Plan").
If UUID format is detected, it is used directly as the template ID.
If not a UUID, the module performs an API lookup to resolve the name to an ID.
state
string
    Choices:
  • present ←
  • absent
The desired state of the response plan on the investigation.
Use present to apply the response plan to the investigation or update the tasks.
Use absent to remove the response plan from the investigation.
tasks
list / elements=dictionary
List of tasks to manage within the applied response plan.
Each task is identified by phase name and task name.
You can set the task status (started/ended) and/or change the owner.
Tasks are only managed when state=present.
owner
string
The owner/assignee of the task.
Use admin for the administrator user.
Use unassigned to remove the current owner or leave unassigned.
phase_name
string / required
The name of the phase containing the task.
Used to look up the phase ID within the applied response plan.
status
string
    Choices:
  • started
  • ended
  • reopened
The desired status of the task.
Use started to mark the task as in progress.
Use ended to mark the task as completed.
Use reopened to reopen a completed task.
task_name
string / required
The name of the task to manage.
Used to look up the task ID within the phase.

Examples -------- .. code-block:: yaml # Apply a response plan to an investigation by name - name: Apply response plan to investigation splunk.es.splunk_response_plan_execution: investigation_ref_id: "590afa9c-23d5-4377-b909-cd2cfa1bc0f1" response_plan: "Incident Response Plan" state: present # Apply a response plan by UUID (no lookup needed) - name: Apply response plan by ID splunk.es.splunk_response_plan_execution: investigation_ref_id: "590afa9c-23d5-4377-b909-cd2cfa1bc0f1" response_plan: "2dc5530d-8bb0-4a4f-9b53-74745bf4ea6a" state: present # Apply response plan and start a task - name: Apply response plan and start initial triage splunk.es.splunk_response_plan_execution: investigation_ref_id: "590afa9c-23d5-4377-b909-cd2cfa1bc0f1" response_plan: "Incident Response Plan" state: present tasks: - phase_name: "Investigation Phase" task_name: "Initial Triage" status: started owner: admin # Manage multiple tasks in an applied response plan - name: Update multiple task statuses splunk.es.splunk_response_plan_execution: investigation_ref_id: "590afa9c-23d5-4377-b909-cd2cfa1bc0f1" response_plan: "Incident Response Plan" state: present tasks: - phase_name: "Investigation Phase" task_name: "Initial Triage" status: ended owner: admin - phase_name: "Investigation Phase" task_name: "Gather Evidence" status: started owner: analyst1 - phase_name: "Containment Phase" task_name: "Isolate Systems" owner: unassigned # Remove a response plan from an investigation - name: Remove response plan from investigation splunk.es.splunk_response_plan_execution: investigation_ref_id: "590afa9c-23d5-4377-b909-cd2cfa1bc0f1" response_plan: "Incident Response Plan" state: absent # Apply response plan with custom API configuration - name: Apply response plan with custom API path splunk.es.splunk_response_plan_execution: investigation_ref_id: "590afa9c-23d5-4377-b909-cd2cfa1bc0f1" response_plan: "Custom Response Plan" state: present 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: .. raw:: html
Key Returned Description
changed
boolean
always
Whether any changes were made.

Sample:
True
msg
string
always
Message describing the result.

Sample:
Response plan applied successfully
response_plan_execution
dictionary
always
The response plan execution result containing before/after states.

Sample:
{'before': {'applied': False}, 'after': {'applied': True, 'applied_plan_id': 'b9ef7dce-6dcd-4900-b5d5-982fc194554a', 'response_plan_id': '2dc5530d-8bb0-4a4f-9b53-74745bf4ea6a'}, 'tasks_updated': [{'phase_name': 'Investigation Phase', 'task_name': 'Initial Triage', 'status': 'started', 'owner': 'admin', 'changed': True}]}
 
after
dictionary
always
The state after module execution.

   
applied
boolean
Whether the response plan is applied after execution.

   
applied_plan_id
string
The ID of the applied response plan instance (if applied).

   
response_plan_id
string
The response plan template ID.

 
before
dictionary
always
The state before module execution.

   
applied
boolean
Whether the response plan was applied before execution.

   
applied_plan_id
string
The ID of the applied response plan instance (if applied).

   
response_plan_id
string
The response plan template ID.

 
tasks_updated
list / elements=dictionary
when tasks parameter is provided
List of tasks that were updated (when tasks parameter is used).

   
changed
boolean
Whether this specific task was changed.

   
owner
string
The task owner after update.

   
phase_name
string
The phase name containing the task.

   
status
string
The task status after update.

   
task_name
string
The task name.



Status ------ Authors ~~~~~~~ - Ron Gershburg (@rgershbu)