Adding parameters
Parameters are used as general placeholders for values that are used on a frequent basis. Examples of parameters are DATABASE_NAME, DIRECTORY, HOSTNAME, URL and so on.
Before you begin
- Parameters can be used as variables that get substituted by a value in the text of a runbook
step, for
example:
STEP 2 In this step you determine the longest running process of system $SYSTEM
- As input to a command defined in a runbook, for
example:
STEP 5 Now issue the command: cd $DIRECTORY
- Parameters of an automation can be filled with the value of a parameter defined for the runbook.
- Automations of type Script have a system parameter
target
which defines the target system where the script is run. - Automations of type Script have a system parameter
user
that specifies the UNIX username which is used to run the script on the target system. This parameter can be mapped automatically to the user who is currently logged in to Runbook Automation. For more information, see Adding automations.
About this task
Operators enter values such as username
, password
,
hostname
, database name
or URL
on a frequent
basis. If you have to deal with many different computer systems, you must remember numerous user
names, passwords, hostnames or database names. In order to avoid typos or having to remember values,
you can define parameters. For example, you can define a parameter DATABASE_NAME
and either provide a default value or enter the value when you run the runbook. Default values are
the best fit if you do not want operators to remember and enter the value.
Parameters are local to the runbook. They are not available for other runbooks.
Parameters are used within runbooks and for automations. Within runbooks, you can use parameters
either standalone, for example URL
, or within a command, for example
connect to HOSTNAME
.
- When a runbook is launched by clicking the execute button from the Runbook Automation UI, an operator must first enter the parameter values. The operator is prompted with the name and description of all parameters defined for the runbook, as well as an optional default value.
- When a runbook is launched from an event, a Trigger defines which values of the event data are mapped to which parameter of the runbook. Values that are entered in this way cannot be changed.
Runbook parameters can be used to define parameter values for automations within the same runbook. Parameter values for automations can be filled using the result of a previously executed automation.
In this way, the parameter Automation output of a previous automation
Find large file systems
is an automatic parameter available for automations in the
current step. It is possible to use the output of any automation that ran before in this
runbook.