@@ -291,6 +291,7 @@ def define_maintenance_window_tasks(
291
291
task_description = params .get ("TASK1_DESCRIPTION" , "" )
292
292
task_run_command = params .get ("TASK1_RUN_COMMAND" , "" )
293
293
task_operation = params .get ("TASK1_OPERATION" , "Scan" )
294
+ task_rebootoption = params .get ("TASK1_REBOOTOPTION" , "NoReboot" )
294
295
295
296
296
297
for response2 in window_target_response ['window1_targets' ]:
@@ -319,7 +320,7 @@ def define_maintenance_window_tasks(
319
320
"RunCommand" : {
320
321
"Parameters" : {
321
322
"Operation" : [task_operation ],
322
- "RebootOption" : ["RebootIfNeeded" ],
323
+ "RebootOption" : [task_rebootoption ],
323
324
},
324
325
"DocumentVersion" : "$DEFAULT" ,
325
326
"TimeoutSeconds" : 3600 ,
@@ -346,6 +347,7 @@ def define_maintenance_window_tasks(
346
347
task_description = params .get ("TASK2_DESCRIPTION" , "" )
347
348
task_run_command = params .get ("TASK2_RUN_COMMAND" , "" )
348
349
task_operation = params .get ("TASK2_OPERATION" , "Scan" )
350
+ task_rebootoption = params .get ("TASK2_REBOOTOPTION" , "NoReboot" )
349
351
350
352
for response2 in window_target_response ['window2_targets' ]:
351
353
LOGGER .info (response2 )
@@ -373,7 +375,7 @@ def define_maintenance_window_tasks(
373
375
"RunCommand" : {
374
376
"Parameters" : {
375
377
"Operation" : [task_operation ],
376
- "RebootOption" : ["RebootIfNeeded" ],
378
+ "RebootOption" : [task_rebootoption ],
377
379
},
378
380
"DocumentVersion" : "$DEFAULT" ,
379
381
"TimeoutSeconds" : 3600 ,
@@ -400,6 +402,7 @@ def define_maintenance_window_tasks(
400
402
task_description = params .get ("TASK3_DESCRIPTION" , "" )
401
403
task_run_command = params .get ("TASK3_RUN_COMMAND" , "" )
402
404
task_operation = params .get ("TASK3_OPERATION" , "Scan" )
405
+ task_rebootoption = params .get ("TASK3_REBOOTOPTION" , "NoReboot" )
403
406
404
407
for response2 in window_target_response ['window3_targets' ]:
405
408
LOGGER .info (response2 )
@@ -427,7 +430,7 @@ def define_maintenance_window_tasks(
427
430
"RunCommand" : {
428
431
"Parameters" : {
429
432
"Operation" : [task_operation ],
430
- "RebootOption" : ["RebootIfNeeded" ],
433
+ "RebootOption" : [task_rebootoption ],
431
434
},
432
435
"DocumentVersion" : "$DEFAULT" ,
433
436
"TimeoutSeconds" : 3600 ,
0 commit comments