Parameters tab of Ansible Credential activity
You can set the parameter values for Ansible credentials from the Composition tab > Credential activity > Parameters tab.
Procedure
-
Select the activity in the Composition tab. The input parameters are displayed along with their name and value in your activity in the Activity details pane.
Note: The Managed services and Ansible integration supports only the Machine credential type.
-
Enter the following values:
-
credential_name_suffix: Suffix is used while creating the credential on the Tower. Credential is created as ActivityInstanceName_suffix.
-
user_name: The user name for the credential.
-
ssh_private_key: The key for the credential.
-
password: The password for the credential.
Note: Enter either the ssh_private_key or password or both for the credential.
-
-
Use Search parameters to filter and search for your parameter.
-
You can hard code the value of a parameter, link the value to a parameter or create a new parameter:
-
Link the parameter value:
-
Select a parameter. The following menu options are available for mapping the 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 lists all of the parameters that are available in the Input parameters section 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.
-
-
Map the parameter values:
- 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 the Search parameter to filter and find a parameter.
-
-
Create a new parameter:
-
Click Link parameter in the Activity details pane to map a new parameter.
-
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 the following value:
- 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 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.
- Invisible - During parameter creation, enter the following value:
-
Click Save.
-
-
The output parameters are displayed at the end along with their names in read-only mode.