run - execute a stored Job on the Rundeck server
run [-h] [-v] [-l level] [nodefilters] [-i id] [-j group/name][-- arguments]
The run command is used to start the execution of a Job defined in Rundeck. The Job is executed on the server, and the ID for the execution is displayed. This is equivalent to logging in to Rundeck and starting a Job within the web application GUI.
The Job can either be specified by ID (-i), or by name and optional group (-j). The Node filters used for the execution of the job can also be specified on the commandline, and will be used instead of any already defined for the Job. Arguments to the Execution can be specified after (--).
--follow option is used, then the output will be retrieved from the server as it is produced and echoed locally.
This can be combined with either
--quiet to show no output and only wait until the execution finishes. Exit status will indicate if the execution succeeded or failed. If
--progress is used instead, then progress of the execution is indicated periodically by echoed '.' characters.
-h, --help : Print usage message.
-v : Run verbosely.
-l, --loglevel LEVEL : Run the command using the specified LEVEL. *LEVEL can be
-I FILTER : Include node filter.
-X FILTER : Exclude node filter.
-C COUNT : Threadcount, defaults to 1.
-K : Keep going on node failure.
-N : Do not keep going on node failures.
-j, --job NAME : Job job (group and name). Run a Job specified by Job name and group. eg: 'Group/Job'.
-i, --id IDENTIFIER : Run the Job with this IDENTIFIER
-- ARGUMENTS : Pass the specified ARGUMENTS as options to the job
-f, --follow : Follow queued execution output
-r, --progress : In follow mode, print progress indicator chars
-q, --quiet : In follow mode, do not show output from the execution, but wait until it completes.
This tool requires a unique Job to be identified for execution. This is done either by using
-i id, or
-j group/name. The group is optional if only one Job with the name exists.
Arguments can be passed to the Job that is being executed after the
-- separator. You must use this separator after all of the tool options that you specify on the commandline.
Each argument that you pass should correspond to a defined Option for the Job. The syntax for passing these options is:
-optionname <value> -otheroption <value>
All Job Options in Rundeck require an argument value if specified.
Run the Job that has ID
run -i 12
Run the same job and pass arguments "name" and "color" corresponding to the Job's Options:
run -i 12 -- -name Bob -color blue
Run the job named "Full" in the group "QA/Test"
run -g QA/Test -n Full
Also runs the job "Full" in QA/Test group:
run -j QA/Test/Full
If you try to run a job by name only, but it is not unique, you will get an error message like this:
run -j testJob Error: Failed request to run a job: Server reported an error: No unique job matched the input: testJob, null. found (2)
Running a Job and specifying Node filters:
run -I tags=dev -X os-family=windows -C 2 -K -j 'test/Job 1'
Run a job by name, and follow the output until it finishes.
run -j QA/Test/Full --follow