Closed michael-hahn closed 5 years ago
:pre
is not a keyword. You name your "subscript" (we need a name to describe those things) whatever you like and have as many as you like.
You can also list as many as you want when provisioning VMs:
config.job :attack_camflow do |job|
job.iterations = 25
job.tasks = {server: [:server], camflow: [:pre, :camflow_start, :attack, :camflow_stop, :post]}
job.inputs = {server: ['ipscan_3.5.5_amd64.deb', 'wget-exploit.py']}
job.outputs = {camflow: {config: '/etc/camflow.ini', trace: '/tmp/audit.log'}}
end
We could easily get the content from a file, but I am bit worried to make the command line overly complex (while it is not super hard to edit a config file).
I understand the mechanism. Okay. I do agree we do not want the command line interface to be overly complicated. Thanks.
In
.xanthus
, a stage is usually a space holder that requires the user to provide instructions. In the following example, the:pre
stage actions are given by the user to create a directory and wait for 5 seconds:Sometimes, the user may want to simply include a path to a file that contains the code to run a stage. This is different from doing things such as:
which still requires the user to manually edit the
.xanthus
file to include the path (an OK solution, but maybe we can do better). Maybe we can consider the option in the command line when user initiate the project, such as: