Variables
When configuring a Task, the values of many fields can optionally be replaced with Variables. Similar to parameters, Variables function as placeholders for customer-specific values, such as, for example, server names, passwords or credentials. Different from parameters however, Variables are resolved at the moment of Job execution, rather than at the moment of Job scheduling.
The values of Variables can be set up at Library > Variables. These values are inherited by default by all Teams and Agents, but exceptions for individual Teams and Agents can be set up on the Team's Team Variables tab and the Agent's Agent Variables tab. Team Variables and Agent Variables allow "owners" of a specific Team or Agent to override the Global Variables by specifying a custom-value. This makes Variables especially useful for use in multi-tenant Ivanti Automation sites, because it makes it easier to manage different settings for different customers and assigned projects, and to exchange Modules, Projects and Run Books with other branches of an organization.
If the number of global variables is greater than 20, the context menu in various places (like tasks) will no longer present the list of global variables. Instead, you can click the See more... context menu option to show a tree-view list of global variables.
Search can be done in the new global variables screen just by start typing a variable name.
Category name behaves like a folder that can be closed or expanded with a double-click.
Example
You can configure Variables to specify a Domain, Security Context and Domain controller for usage in a Task Manage Active Directory Computer. This creates a generic Task that can be used by all customers in your multi-tenant site. "Owners" of a specific Team or Agent at the customer site can override the global values of these Variables by specifying a custom-value that only applies to their site. When the Task is executed, the Task automatically gets the correct values that applies to the individual customer site. Depending on the hierarchy of these Variables, these can be the global values, Team-specific values or Agent-specific values.
Configuration
- Variables can be divided in categories. The category General is a default category and cannot be edited or removed.
- The name of a Variable or category must be unique in your Ivanti Automation environment.
- When configuring Variables, you can use the following types:
- Credentials: this is a combination of domain\user name and password. Use this in a user name field for which there is also a password field, for example in the Security Context of a Task. The matching password field will be disabled, as this type of Variable will fill both. The password is always masked.
- Password: this is a password only. Use this in password fields that are not part of a set of credentials, for example for the password for a new local user. The value of this type of Variable is always masked. Its input must be entered twice for confirmation.
- Text: this is a text string of a single line. Use this in any field that needs to contain text, for example file name, Organizational Unit name, etc.
- The global Variables apply to all Teams and Agents, but can be overridden by Team Variables or Agent Variables.
- Agents can use Agent-specific values, inherit these values from their primary Team, or inherit them from the global Variables.
- Teams can use Team-specific values, or inherit them from the global Variables. Nested Teams do not inherit their settings from the Team in which they are nested.
- Variables can only be added and deleted at Library > Variables; not from the Team Variables tab of a Team or from the Agent Variables tab of an Agent.
- When a Variable is deleted, its value will no longer be resolved in the Tasks in which it is used, but becomes an actual value. For example, if you have used a Variable ^[CustomerName] in a field in a Task, and delete this Variable without changing its value in this Task, the actual value of the field becomes "^[CustomerName]".
- To create and insert a Variable in a field of a Task automatically, right-click the relevant field in the Task, click Insert Variables and select the Variable. Variables are divided by category in the context menu.
- Certain Tasks require the use of Variables, as placeholders for information that is needed for a successful execution of these Tasks. If the required Variables do not yet exist in your Ivanti Automation environment, a section will be available on the Settings tab of the Task, which contains fields to provide values for these Variables.
- When saving the configuration of the Task, the required Variables will be created automatically at Library > Variables. This makes it easier to configure these Tasks.
Clean-up
-
Ivanti Automation can evaluate if a Global Variable is used or not, on the Usage tab of the Global Variable properties. Click on it in order to start evaluating in how many objects the variable is part of. A list of Modules, Project and Run Books will be presented. Please refer to “Last Run (UTC)” and “Run Count” columns in order to better appreciate if the Global Variable should be removed or not.
- When creating and importing a Building Block of Modules containing one or more Tasks in which Variables are used, the Variables and related categories will be saved and/or restored.
- When exporting Results, all Agent Variables are included in the XML files, which can for example be used for Asset Management. (CMDB, Content Management Database).
- It is not possible to base the value of a Variable on another Variable, a parameter or a function. These values cannot be resolved.
- The use of global Variables in Run Book parameters, Run Book conditions and Run Book evaluators is not supported.