Parameters tab of Ansible Credential activity
You can set the parameter values for Ansible Job Templates from the Composition tab > Job Templates activity > Parameters tab.
Procedure
-
Select the activity in the Composition tab. The input parameters are displayed along with their name and value in the Activity details pane.
-
Inventory Name: Enter the exact name of the inventory used in the Ansible.
-
Credential Name: Enter the exact name of the credential used in the Ansible.
-
Extra Variables: Enter the extra variables.
-
You can use the Search Parameters to filter and search for a parameter.
-
You can edit directly to hardcode the value of a parameter, link the value to a parameter or create a new parameter:
-
Link the parameter value:
-
Click the parameter, then click Link Parameters in the Activity details pane to map a parameter.
-
Select one of the following options for mapping parameter values: Note: Not all options are available for a parameter. It varies based on the activities used in the service.
- Input Parameters - The Input Parameters menu option lists all of the available parameters of the main Parameters tab of a service.
- Shared Parameters Note: If you link the attribute of a shared parameter, then an input parameter is automatically created. During service deployment, select the dataobject for the datatype. The data attribute value of the selected dataobject is used during provisioning.
- Templates - The Templates menu option lists the templates available.
- Ansible - The Ansible menu option lists the Ansible job templates.
-
Map values with the parameter:
- Select an option in the Link Parameter dialog box. The values displayed in the Activity details pane change based on what you select and which activities you use in your service workflow.
- Expand the parameter menu and hover over the parameters to see a plus icon.
- Click the plus icon to select it. A green tick mark indicates your selection and also the Value is refreshed. You can also use Search Parameter to filter and find a parameter.
-
-
Create a new parameter:
-
Click Link Parameter in the Activity details pane.
-
In the Link Parameter dialog box, click Create. You can create only a new parameter whose type exists in the template activity. For example, a template has string, Boolean, and map parameter types. If you want to create a new parameter of type counter, you must go to the main Parameters tab. To work with the main Parameters tab, see Working with the Parameters tab.
-
Select End-User Permissions.
The three different types of permissions are as follows:
-
Invisible - During parameter creation, enter a value for the Default Value. This parameter is not visible while creating an instance of the service. Note: For the Invisible parameter, if you enter incorrect data in the default value field, then the Service instance deployment of the content run time fails.
-
Read-only - During parameter creation, enter or select the following values:
- Parameter Type - Select a type. It determines the type of parameter. The available parameter types are string, password, list, Boolean, counter, map, connection, and shared parameters.
- Display Name - The label or display name of the parameter.
- Description - The description appears as a tooltip when the customer orders this service.
- Default Value - The default value of the parameter. When you create the service instance, this parameter is visible to you in read-only format.
- For list data type, you can click Add New to add a list of values.
- For map data type, you can click Add New to add a list of Key Value pairs. Click cross icon to delete a value record.
- For password data type, toggle between Show and Hide to view or hide the password characters.
-
Read and Write - When you create a service instance, you can make changes to the values that were defined during creation. Enter or select the following values for Read and Write permission:
-
Parameter Type - Select a type. It determines the type of parameter. The available parameters are string, stringlist, password, list, boolean, counter, and map.
-
Value Required - Determines whether a value is required for the parameter.
-
Specify Options - For string data type, you can select this option for a drop-down list of string values.
-
Display Name - The label or display name of the parameter.
-
Description - The description appears as a tooltip when the customer orders this service.
-
Validation Rule - The validation rule is a non mandatory field that is available only if you select “string” or “password” value in Parameter Type drop-down list. Validation Rule (regex) provides an ability to the service composer to restrict the values of an input parameter. If regex is provided during service composition, then the value of the string input parameter must satisfy the regex criteria during service deployment. For example, (\w+?@\w+?\x2E.+).
-
Validation Rule Description - Validation Rule Description (regexdesc) provides information about the validation rule. For example, “Enter a valid email address”. Here, (\w+?@\w+?\x2E.+) is the regular expression for an email address. If you try to enter “abc.xyz.com” as the value for string input parameters, then service deployment fails due to invalid email address.
Note: For more information about regex, see regexlib.com
.
-
Default Value - If you select, Specify Options, then enter values for Label and Value pair fields. Select a record to mark it as default value. You can click the cross mark icon to delete a value record.
-
-
-
Click Save to save the changes.
-
-
-
The output parameters are displayed at the end along with their names in read-only mode. You can also view the output parameters in the Source Code tab at the same level as
template_params
.