Skip to content

Commit f98f26c

Browse files
Update app.py
1 parent fdbafa0 commit f98f26c

File tree

1 file changed

+6
-3
lines changed
  • aws_sra_examples/solutions/patch_mgmt/patch_mgmt_org/lambda/src

1 file changed

+6
-3
lines changed

aws_sra_examples/solutions/patch_mgmt/patch_mgmt_org/lambda/src/app.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ def define_maintenance_window_tasks(
291291
task_description = params.get("TASK1_DESCRIPTION", "")
292292
task_run_command = params.get("TASK1_RUN_COMMAND", "")
293293
task_operation = params.get("TASK1_OPERATION", "Scan")
294+
task_rebootoption = params.get("TASK1_REBOOTOPTION", "NoReboot")
294295

295296

296297
for response2 in window_target_response['window1_targets']:
@@ -319,7 +320,7 @@ def define_maintenance_window_tasks(
319320
"RunCommand": {
320321
"Parameters": {
321322
"Operation": [task_operation],
322-
"RebootOption": ["RebootIfNeeded"],
323+
"RebootOption": [task_rebootoption],
323324
},
324325
"DocumentVersion": "$DEFAULT",
325326
"TimeoutSeconds": 3600,
@@ -346,6 +347,7 @@ def define_maintenance_window_tasks(
346347
task_description = params.get("TASK2_DESCRIPTION", "")
347348
task_run_command = params.get("TASK2_RUN_COMMAND", "")
348349
task_operation = params.get("TASK2_OPERATION", "Scan")
350+
task_rebootoption = params.get("TASK2_REBOOTOPTION", "NoReboot")
349351

350352
for response2 in window_target_response['window2_targets']:
351353
LOGGER.info(response2)
@@ -373,7 +375,7 @@ def define_maintenance_window_tasks(
373375
"RunCommand": {
374376
"Parameters": {
375377
"Operation": [task_operation],
376-
"RebootOption": ["RebootIfNeeded"],
378+
"RebootOption": [task_rebootoption],
377379
},
378380
"DocumentVersion": "$DEFAULT",
379381
"TimeoutSeconds": 3600,
@@ -400,6 +402,7 @@ def define_maintenance_window_tasks(
400402
task_description = params.get("TASK3_DESCRIPTION", "")
401403
task_run_command = params.get("TASK3_RUN_COMMAND", "")
402404
task_operation = params.get("TASK3_OPERATION", "Scan")
405+
task_rebootoption = params.get("TASK3_REBOOTOPTION", "NoReboot")
403406

404407
for response2 in window_target_response['window3_targets']:
405408
LOGGER.info(response2)
@@ -427,7 +430,7 @@ def define_maintenance_window_tasks(
427430
"RunCommand": {
428431
"Parameters": {
429432
"Operation": [task_operation],
430-
"RebootOption": ["RebootIfNeeded"],
433+
"RebootOption": [task_rebootoption],
431434
},
432435
"DocumentVersion": "$DEFAULT",
433436
"TimeoutSeconds": 3600,

0 commit comments

Comments
 (0)