Job Template parameters and surveys
In Ansible® a Job Template or Workflow Job Template can define a number of parameters and properties. They can be defined directly in Ansible’s template itself, or can be set to prompt on
launch
. Every parameter that's set to be prompted must be supplied during template launch by
IBM® Runbook Automation. In the case of an Ansible Automation executed through Runbook Automation, this
translates to automation parameters.
- diff_mode (type: boolean)
- extra_vars (type: string in JSON format)
- inventory (type: integer)
- credentials (type: integer; enumeration with labels)
- limit (type: string)
- verbosity (type: integer; range 0-5)
- tags (type: string)
- skip_tags (type: string)
- extra_vars (type: string in JSON format)
- inventory (type: integer)
survey. For every parameter defined in the survey an additional Automation parameter is created. These parameter names are prefixed with
extraVariables.and have a schema similar to the one defined for the survey parameter. For example, if you define a survey parameter with the name
ageand define it as an integer with minimum value
0and maximum value of
99, then the Automation will have a parameter called
extraVariables.ageof type
integer, with minimum value of
0and maximum value of
99.
Prompt on launchflag for the
Extra Variablesselection in your template. That way users can specify the values using the
extraVariables.parameter.
The Ansible Automation Provider will harvest the existing Job Templates and Workflow Job Templates and create matching Automations out of them. Those Automations are automatically created and kept synchronized with Ansible. They cannot be changed inside Runbook Automation. To change these Automations, directly edit the Job Template or Workflow Job Template inside Ansible. Runbook Automation will pick up the change and update the Automation referencing the asset.
If an Ansible Automation changes, make sure to update any parameter mappings made towards that Automation in your runbooks.
If a parameter is set to prompt on launch
in Ansible, but also defines a value, Runbook Automation will import Ansible’s default value into the automation parameter.
During execution of Ansible Automations the Runbook Automation UI ensures that you can only pass values that conform to the parameter schemas. If you are using the API, make sure to pass the correct values by comparing your input to the parameter schemas.
Define default values in Ansible for parameters you want to prompt for. For more details on parameters, see the Ansible Documentation for Job Templates or Workflow Job Templates.