File tree Expand file tree Collapse file tree 1 file changed +76
-0
lines changed Expand file tree Collapse file tree 1 file changed +76
-0
lines changed Original file line number Diff line number Diff line change @@ -400,3 +400,79 @@ restore
400
400
type: bool | Default: false
401
401
402
402
VM is stopped for exporting VHD. Restore can be set to true to start the VM after exporting.
403
+
404
+
405
+ Use Script File Transformer
406
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
407
+
408
+ This transformer is used to install required packages, execute scripts on a node, and optionally reboot the node after execution.
409
+
410
+ Usage
411
+ ``````
412
+ .. code :: yaml
413
+
414
+ transformer :
415
+ - type : script_file
416
+ phase : expanded
417
+ connection :
418
+ address : $(build_vm_address)
419
+ private_key_file : $(admin_private_key_file)
420
+ reboot : true
421
+ dependent_packages :
422
+ - git
423
+ scripts :
424
+ - script : " /tmp/waagent.sh"
425
+ interpreter : bash
426
+ args : " --flag"
427
+ expected_exit_code : 0
428
+
429
+ Outputs
430
+ ````````
431
+ - results
432
+
433
+ Reference
434
+ `````````
435
+
436
+ dependent_packages
437
+ ^^^^^^^^^^^^^^^^^
438
+ type: List[str] | Default: []
439
+
440
+ List of packages to install before executing scripts.
441
+
442
+ scripts (Required)
443
+ ^^^^^^^^^^^^^^^
444
+ type: List[ScriptEntry]
445
+
446
+ List of scripts to execute on the node.
447
+
448
+ Script Entry Properties:
449
+
450
+ script (Required)
451
+ """"""""""""""""
452
+ type: string
453
+
454
+ Path to the script file on the target node.
455
+
456
+ interpreter
457
+ """"""""""
458
+ type: string | Default: "bash"
459
+
460
+ Interpreter to use for executing the script. Currently only bash is supported.
461
+
462
+ args
463
+ """"
464
+ type: string | Default: None
465
+
466
+ Arguments to pass to the script.
467
+
468
+ expected_exit_code
469
+ """"""""""""""""
470
+ type: int | Default: 0
471
+
472
+ Expected exit code of the script. If the script returns a different exit code, execution will fail.
473
+
474
+ reboot
475
+ ^^^^^
476
+ type: bool | Default: false
477
+
478
+ Reboot the node after script execution.
You can’t perform that action at this time.
0 commit comments