Debian Codegraph @

ansible_collections/splunk/es/docs/splunk.es.splunk_response_plan_execution_module.rst

raw
1 .. _splunk.es.splunk_response_plan_execution_module:
2
3
4 ****************************************
5 splunk.es.splunk_response_plan_execution
6 ****************************************
7
8 **Apply response plans to investigations and manage tasks**
9
10
11 Version added: 5.1.0
12
13 .. contents::
14 :local:
15 :depth: 1
16
17
18 Synopsis
19 --------
20 - This module applies or removes response plans from Splunk Enterprise Security investigations.
21 - It also manages task lifecycle within applied response plans (start, end, change owner).
22 - The ``response_plan`` parameter accepts either a UUID or a name.
23 - When ``state=present``, the response plan is applied to the investigation.
24 - When ``state=absent``, the response plan is removed from the investigation.
25 - Use the ``tasks`` parameter to manage individual task statuses and owners within the applied plan.
26
27
28
29
30 Parameters
31 ----------
32
33 .. raw:: html
34
35 <table border=0 cellpadding=0 class="documentation-table">
36 <tr>
37 <th colspan="2">Parameter</th>
38 <th>Choices/<font color="blue">Defaults</font></th>
39 <th width="100%">Comments</th>
40 </tr>
41 <tr>
42 <td colspan="2">
43 <div class="ansibleOptionAnchor" id="parameter-"></div>
44 <b>api_app</b>
45 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
46 <div style="font-size: small">
47 <span style="color: purple">string</span>
48 </div>
49 </td>
50 <td>
51 <b>Default:</b><br/><div style="color: blue">"missioncontrol"</div>
52 </td>
53 <td>
54 <div>The app portion of the Splunk API path.</div>
55 <div>Override this if your environment uses a different app name.</div>
56 </td>
57 </tr>
58 <tr>
59 <td colspan="2">
60 <div class="ansibleOptionAnchor" id="parameter-"></div>
61 <b>api_namespace</b>
62 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
63 <div style="font-size: small">
64 <span style="color: purple">string</span>
65 </div>
66 </td>
67 <td>
68 <b>Default:</b><br/><div style="color: blue">"servicesNS"</div>
69 </td>
70 <td>
71 <div>The namespace portion of the Splunk API path.</div>
72 <div>Override this if your environment uses a different namespace.</div>
73 </td>
74 </tr>
75 <tr>
76 <td colspan="2">
77 <div class="ansibleOptionAnchor" id="parameter-"></div>
78 <b>api_user</b>
79 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
80 <div style="font-size: small">
81 <span style="color: purple">string</span>
82 </div>
83 </td>
84 <td>
85 <b>Default:</b><br/><div style="color: blue">"nobody"</div>
86 </td>
87 <td>
88 <div>The user portion of the Splunk API path.</div>
89 <div>Override this if your environment requires a different user context.</div>
90 </td>
91 </tr>
92 <tr>
93 <td colspan="2">
94 <div class="ansibleOptionAnchor" id="parameter-"></div>
95 <b>investigation_ref_id</b>
96 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
97 <div style="font-size: small">
98 <span style="color: purple">string</span>
99 / <span style="color: red">required</span>
100 </div>
101 </td>
102 <td>
103 </td>
104 <td>
105 <div>The investigation UUID to apply or manage response plans.</div>
106 <div>This is the unique identifier of the investigation in Splunk ES.</div>
107 </td>
108 </tr>
109 <tr>
110 <td colspan="2">
111 <div class="ansibleOptionAnchor" id="parameter-"></div>
112 <b>response_plan</b>
113 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
114 <div style="font-size: small">
115 <span style="color: purple">string</span>
116 / <span style="color: red">required</span>
117 </div>
118 </td>
119 <td>
120 </td>
121 <td>
122 <div>The response plan template to apply or remove.</div>
123 <div>Accepts either a UUID (e.g., &quot;2dc5530d-8bb0-4a4f-9b53-74745bf4ea6a&quot;) or a name (e.g., &quot;Incident Response Plan&quot;).</div>
124 <div>If UUID format is detected, it is used directly as the template ID.</div>
125 <div>If not a UUID, the module performs an API lookup to resolve the name to an ID.</div>
126 </td>
127 </tr>
128 <tr>
129 <td colspan="2">
130 <div class="ansibleOptionAnchor" id="parameter-"></div>
131 <b>state</b>
132 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
133 <div style="font-size: small">
134 <span style="color: purple">string</span>
135 </div>
136 </td>
137 <td>
138 <ul style="margin: 0; padding: 0"><b>Choices:</b>
139 <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
140 <li>absent</li>
141 </ul>
142 </td>
143 <td>
144 <div>The desired state of the response plan on the investigation.</div>
145 <div>Use <code>present</code> to apply the response plan to the investigation or update the tasks.</div>
146 <div>Use <code>absent</code> to remove the response plan from the investigation.</div>
147 </td>
148 </tr>
149 <tr>
150 <td colspan="2">
151 <div class="ansibleOptionAnchor" id="parameter-"></div>
152 <b>tasks</b>
153 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
154 <div style="font-size: small">
155 <span style="color: purple">list</span>
156 / <span style="color: purple">elements=dictionary</span>
157 </div>
158 </td>
159 <td>
160 </td>
161 <td>
162 <div>List of tasks to manage within the applied response plan.</div>
163 <div>Each task is identified by phase name and task name.</div>
164 <div>You can set the task status (started/ended) and/or change the owner.</div>
165 <div>Tasks are only managed when <code>state=present</code>.</div>
166 </td>
167 </tr>
168 <tr>
169 <td class="elbow-placeholder"></td>
170 <td colspan="1">
171 <div class="ansibleOptionAnchor" id="parameter-"></div>
172 <b>owner</b>
173 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
174 <div style="font-size: small">
175 <span style="color: purple">string</span>
176 </div>
177 </td>
178 <td>
179 </td>
180 <td>
181 <div>The owner/assignee of the task.</div>
182 <div>Use <code>admin</code> for the administrator user.</div>
183 <div>Use <code>unassigned</code> to remove the current owner or leave unassigned.</div>
184 </td>
185 </tr>
186 <tr>
187 <td class="elbow-placeholder"></td>
188 <td colspan="1">
189 <div class="ansibleOptionAnchor" id="parameter-"></div>
190 <b>phase_name</b>
191 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
192 <div style="font-size: small">
193 <span style="color: purple">string</span>
194 / <span style="color: red">required</span>
195 </div>
196 </td>
197 <td>
198 </td>
199 <td>
200 <div>The name of the phase containing the task.</div>
201 <div>Used to look up the phase ID within the applied response plan.</div>
202 </td>
203 </tr>
204 <tr>
205 <td class="elbow-placeholder"></td>
206 <td colspan="1">
207 <div class="ansibleOptionAnchor" id="parameter-"></div>
208 <b>status</b>
209 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
210 <div style="font-size: small">
211 <span style="color: purple">string</span>
212 </div>
213 </td>
214 <td>
215 <ul style="margin: 0; padding: 0"><b>Choices:</b>
216 <li>started</li>
217 <li>ended</li>
218 <li>reopened</li>
219 </ul>
220 </td>
221 <td>
222 <div>The desired status of the task.</div>
223 <div>Use <code>started</code> to mark the task as in progress.</div>
224 <div>Use <code>ended</code> to mark the task as completed.</div>
225 <div>Use <code>reopened</code> to reopen a completed task.</div>
226 </td>
227 </tr>
228 <tr>
229 <td class="elbow-placeholder"></td>
230 <td colspan="1">
231 <div class="ansibleOptionAnchor" id="parameter-"></div>
232 <b>task_name</b>
233 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
234 <div style="font-size: small">
235 <span style="color: purple">string</span>
236 / <span style="color: red">required</span>
237 </div>
238 </td>
239 <td>
240 </td>
241 <td>
242 <div>The name of the task to manage.</div>
243 <div>Used to look up the task ID within the phase.</div>
244 </td>
245 </tr>
246
247 </table>
248 <br/>
249
250
251
252
253 Examples
254 --------
255
256 .. code-block:: yaml
257
258 # Apply a response plan to an investigation by name
259 - name: Apply response plan to investigation
260 splunk.es.splunk_response_plan_execution:
261 investigation_ref_id: "590afa9c-23d5-4377-b909-cd2cfa1bc0f1"
262 response_plan: "Incident Response Plan"
263 state: present
264
265 # Apply a response plan by UUID (no lookup needed)
266 - name: Apply response plan by ID
267 splunk.es.splunk_response_plan_execution:
268 investigation_ref_id: "590afa9c-23d5-4377-b909-cd2cfa1bc0f1"
269 response_plan: "2dc5530d-8bb0-4a4f-9b53-74745bf4ea6a"
270 state: present
271
272 # Apply response plan and start a task
273 - name: Apply response plan and start initial triage
274 splunk.es.splunk_response_plan_execution:
275 investigation_ref_id: "590afa9c-23d5-4377-b909-cd2cfa1bc0f1"
276 response_plan: "Incident Response Plan"
277 state: present
278 tasks:
279 - phase_name: "Investigation Phase"
280 task_name: "Initial Triage"
281 status: started
282 owner: admin
283
284 # Manage multiple tasks in an applied response plan
285 - name: Update multiple task statuses
286 splunk.es.splunk_response_plan_execution:
287 investigation_ref_id: "590afa9c-23d5-4377-b909-cd2cfa1bc0f1"
288 response_plan: "Incident Response Plan"
289 state: present
290 tasks:
291 - phase_name: "Investigation Phase"
292 task_name: "Initial Triage"
293 status: ended
294 owner: admin
295 - phase_name: "Investigation Phase"
296 task_name: "Gather Evidence"
297 status: started
298 owner: analyst1
299 - phase_name: "Containment Phase"
300 task_name: "Isolate Systems"
301 owner: unassigned
302
303 # Remove a response plan from an investigation
304 - name: Remove response plan from investigation
305 splunk.es.splunk_response_plan_execution:
306 investigation_ref_id: "590afa9c-23d5-4377-b909-cd2cfa1bc0f1"
307 response_plan: "Incident Response Plan"
308 state: absent
309
310 # Apply response plan with custom API configuration
311 - name: Apply response plan with custom API path
312 splunk.es.splunk_response_plan_execution:
313 investigation_ref_id: "590afa9c-23d5-4377-b909-cd2cfa1bc0f1"
314 response_plan: "Custom Response Plan"
315 state: present
316 api_namespace: "{{ es_namespace | default('servicesNS') }}"
317 api_user: "{{ es_user | default('nobody') }}"
318 api_app: "{{ es_app | default('missioncontrol') }}"
319
320
321
322 Return Values
323 -------------
324 Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
325
326 .. raw:: html
327
328 <table border=0 cellpadding=0 class="documentation-table">
329 <tr>
330 <th colspan="3">Key</th>
331 <th>Returned</th>
332 <th width="100%">Description</th>
333 </tr>
334 <tr>
335 <td colspan="3">
336 <div class="ansibleOptionAnchor" id="return-"></div>
337 <b>changed</b>
338 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
339 <div style="font-size: small">
340 <span style="color: purple">boolean</span>
341 </div>
342 </td>
343 <td>always</td>
344 <td>
345 <div>Whether any changes were made.</div>
346 <br/>
347 <div style="font-size: smaller"><b>Sample:</b></div>
348 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">True</div>
349 </td>
350 </tr>
351 <tr>
352 <td colspan="3">
353 <div class="ansibleOptionAnchor" id="return-"></div>
354 <b>msg</b>
355 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
356 <div style="font-size: small">
357 <span style="color: purple">string</span>
358 </div>
359 </td>
360 <td>always</td>
361 <td>
362 <div>Message describing the result.</div>
363 <br/>
364 <div style="font-size: smaller"><b>Sample:</b></div>
365 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">Response plan applied successfully</div>
366 </td>
367 </tr>
368 <tr>
369 <td colspan="3">
370 <div class="ansibleOptionAnchor" id="return-"></div>
371 <b>response_plan_execution</b>
372 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
373 <div style="font-size: small">
374 <span style="color: purple">dictionary</span>
375 </div>
376 </td>
377 <td>always</td>
378 <td>
379 <div>The response plan execution result containing before/after states.</div>
380 <br/>
381 <div style="font-size: smaller"><b>Sample:</b></div>
382 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{&#x27;before&#x27;: {&#x27;applied&#x27;: False}, &#x27;after&#x27;: {&#x27;applied&#x27;: True, &#x27;applied_plan_id&#x27;: &#x27;b9ef7dce-6dcd-4900-b5d5-982fc194554a&#x27;, &#x27;response_plan_id&#x27;: &#x27;2dc5530d-8bb0-4a4f-9b53-74745bf4ea6a&#x27;}, &#x27;tasks_updated&#x27;: [{&#x27;phase_name&#x27;: &#x27;Investigation Phase&#x27;, &#x27;task_name&#x27;: &#x27;Initial Triage&#x27;, &#x27;status&#x27;: &#x27;started&#x27;, &#x27;owner&#x27;: &#x27;admin&#x27;, &#x27;changed&#x27;: True}]}</div>
383 </td>
384 </tr>
385 <tr>
386 <td class="elbow-placeholder">&nbsp;</td>
387 <td colspan="2">
388 <div class="ansibleOptionAnchor" id="return-"></div>
389 <b>after</b>
390 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
391 <div style="font-size: small">
392 <span style="color: purple">dictionary</span>
393 </div>
394 </td>
395 <td>always</td>
396 <td>
397 <div>The state after module execution.</div>
398 <br/>
399 </td>
400 </tr>
401 <tr>
402 <td class="elbow-placeholder">&nbsp;</td>
403 <td class="elbow-placeholder">&nbsp;</td>
404 <td colspan="1">
405 <div class="ansibleOptionAnchor" id="return-"></div>
406 <b>applied</b>
407 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
408 <div style="font-size: small">
409 <span style="color: purple">boolean</span>
410 </div>
411 </td>
412 <td></td>
413 <td>
414 <div>Whether the response plan is applied after execution.</div>
415 <br/>
416 </td>
417 </tr>
418 <tr>
419 <td class="elbow-placeholder">&nbsp;</td>
420 <td class="elbow-placeholder">&nbsp;</td>
421 <td colspan="1">
422 <div class="ansibleOptionAnchor" id="return-"></div>
423 <b>applied_plan_id</b>
424 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
425 <div style="font-size: small">
426 <span style="color: purple">string</span>
427 </div>
428 </td>
429 <td></td>
430 <td>
431 <div>The ID of the applied response plan instance (if applied).</div>
432 <br/>
433 </td>
434 </tr>
435 <tr>
436 <td class="elbow-placeholder">&nbsp;</td>
437 <td class="elbow-placeholder">&nbsp;</td>
438 <td colspan="1">
439 <div class="ansibleOptionAnchor" id="return-"></div>
440 <b>response_plan_id</b>
441 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
442 <div style="font-size: small">
443 <span style="color: purple">string</span>
444 </div>
445 </td>
446 <td></td>
447 <td>
448 <div>The response plan template ID.</div>
449 <br/>
450 </td>
451 </tr>
452
453 <tr>
454 <td class="elbow-placeholder">&nbsp;</td>
455 <td colspan="2">
456 <div class="ansibleOptionAnchor" id="return-"></div>
457 <b>before</b>
458 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
459 <div style="font-size: small">
460 <span style="color: purple">dictionary</span>
461 </div>
462 </td>
463 <td>always</td>
464 <td>
465 <div>The state before module execution.</div>
466 <br/>
467 </td>
468 </tr>
469 <tr>
470 <td class="elbow-placeholder">&nbsp;</td>
471 <td class="elbow-placeholder">&nbsp;</td>
472 <td colspan="1">
473 <div class="ansibleOptionAnchor" id="return-"></div>
474 <b>applied</b>
475 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
476 <div style="font-size: small">
477 <span style="color: purple">boolean</span>
478 </div>
479 </td>
480 <td></td>
481 <td>
482 <div>Whether the response plan was applied before execution.</div>
483 <br/>
484 </td>
485 </tr>
486 <tr>
487 <td class="elbow-placeholder">&nbsp;</td>
488 <td class="elbow-placeholder">&nbsp;</td>
489 <td colspan="1">
490 <div class="ansibleOptionAnchor" id="return-"></div>
491 <b>applied_plan_id</b>
492 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
493 <div style="font-size: small">
494 <span style="color: purple">string</span>
495 </div>
496 </td>
497 <td></td>
498 <td>
499 <div>The ID of the applied response plan instance (if applied).</div>
500 <br/>
501 </td>
502 </tr>
503 <tr>
504 <td class="elbow-placeholder">&nbsp;</td>
505 <td class="elbow-placeholder">&nbsp;</td>
506 <td colspan="1">
507 <div class="ansibleOptionAnchor" id="return-"></div>
508 <b>response_plan_id</b>
509 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
510 <div style="font-size: small">
511 <span style="color: purple">string</span>
512 </div>
513 </td>
514 <td></td>
515 <td>
516 <div>The response plan template ID.</div>
517 <br/>
518 </td>
519 </tr>
520
521 <tr>
522 <td class="elbow-placeholder">&nbsp;</td>
523 <td colspan="2">
524 <div class="ansibleOptionAnchor" id="return-"></div>
525 <b>tasks_updated</b>
526 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
527 <div style="font-size: small">
528 <span style="color: purple">list</span>
529 / <span style="color: purple">elements=dictionary</span>
530 </div>
531 </td>
532 <td>when tasks parameter is provided</td>
533 <td>
534 <div>List of tasks that were updated (when tasks parameter is used).</div>
535 <br/>
536 </td>
537 </tr>
538 <tr>
539 <td class="elbow-placeholder">&nbsp;</td>
540 <td class="elbow-placeholder">&nbsp;</td>
541 <td colspan="1">
542 <div class="ansibleOptionAnchor" id="return-"></div>
543 <b>changed</b>
544 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
545 <div style="font-size: small">
546 <span style="color: purple">boolean</span>
547 </div>
548 </td>
549 <td></td>
550 <td>
551 <div>Whether this specific task was changed.</div>
552 <br/>
553 </td>
554 </tr>
555 <tr>
556 <td class="elbow-placeholder">&nbsp;</td>
557 <td class="elbow-placeholder">&nbsp;</td>
558 <td colspan="1">
559 <div class="ansibleOptionAnchor" id="return-"></div>
560 <b>owner</b>
561 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
562 <div style="font-size: small">
563 <span style="color: purple">string</span>
564 </div>
565 </td>
566 <td></td>
567 <td>
568 <div>The task owner after update.</div>
569 <br/>
570 </td>
571 </tr>
572 <tr>
573 <td class="elbow-placeholder">&nbsp;</td>
574 <td class="elbow-placeholder">&nbsp;</td>
575 <td colspan="1">
576 <div class="ansibleOptionAnchor" id="return-"></div>
577 <b>phase_name</b>
578 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
579 <div style="font-size: small">
580 <span style="color: purple">string</span>
581 </div>
582 </td>
583 <td></td>
584 <td>
585 <div>The phase name containing the task.</div>
586 <br/>
587 </td>
588 </tr>
589 <tr>
590 <td class="elbow-placeholder">&nbsp;</td>
591 <td class="elbow-placeholder">&nbsp;</td>
592 <td colspan="1">
593 <div class="ansibleOptionAnchor" id="return-"></div>
594 <b>status</b>
595 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
596 <div style="font-size: small">
597 <span style="color: purple">string</span>
598 </div>
599 </td>
600 <td></td>
601 <td>
602 <div>The task status after update.</div>
603 <br/>
604 </td>
605 </tr>
606 <tr>
607 <td class="elbow-placeholder">&nbsp;</td>
608 <td class="elbow-placeholder">&nbsp;</td>
609 <td colspan="1">
610 <div class="ansibleOptionAnchor" id="return-"></div>
611 <b>task_name</b>
612 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
613 <div style="font-size: small">
614 <span style="color: purple">string</span>
615 </div>
616 </td>
617 <td></td>
618 <td>
619 <div>The task name.</div>
620 <br/>
621 </td>
622 </tr>
623
624
625 </table>
626 <br/><br/>
627
628
629 Status
630 ------
631
632
633 Authors
634 ~~~~~~~
635
636 - Ron Gershburg (@rgershbu)