Configuring the Ansible Tower connector
You configure an on-premises connector to establish a connection between BMC Helix Intelligent Automation and Ansible Tower.
To configure an on-premises connector, you first create a plugin key, download the plugin installer, create credentials, and then run the plugin. After configuration, the relevant actions for a connector are available during policy creation. If a plugin key is used in a connector configuration once, you can reuse it for multiple connectors.
Task 1: To create a plugin key
- In the BMC Helix Intelligent Automation console, click Connectors > Plugin Keys tab.
- Click Create Plugin Key and do the following steps:
- (Optional) Enter a new name for the plugin with which you want to associate the plugin key.
(Optional) Update the expiry date for the plugin key.
By default, a plugin key expires in 90 days. To ensure that the connector is running, you can extend the date before it expires.
Click Download Plugin Key.
A creds.json file gets downloaded.
If you close the Create Plugin Key panel before downloading the key, you cannot download and use the plugin key. Instead, you need to create a new plugin key.
The plugin and the associated plugin key appear on the Plugins page.
Task 2: To download the plugin
You can download and run a plugin on a Linux or a Microsoft Windows server. This server should be accessible from the computer where the automation tool or application is installed.
- In the BMC Helix Intelligent Automation console, click Connectors > Available Connectors and click Configure against the connector.
- On the following message that appears on the configure connector page, click the download & install link.
- On the Configure On-premises Connector page, click Download Plugin.
The remote-restapi-plugin.zip file is downloaded.
- Copy and extract the downloaded ZIP file and go to the remote-restapi-plugin directory.
- (For Linux only) Ensure that the run.sh file has the execute permission.
To create credentials by using the plugin key
A plugin requires credentials to authenticate and execute various actions on the target applications that are defined in an automation policy. The credential CLI utility enables you to create, search, update, and delete credentials for a plugin.
The current release supports the credential CLI utility only on Linux. This server should be accessible from the server where the on-premise application is installed.
- On the Linux server, navigate to the directory where you have extracted the remote-restapi-plugin.zip file.
The remote-restapi-plugin directory contains credential.sh.
- Ensure that the credential.sh file has the execute permission.
Run the following
createswitch command to create credentials.
Whenever credentials are created, a unique credential ID is assigned to it.Sample
./credential.sh create -n <credentialsName> -i <credentialsExample for Ansible Tower
./credential.sh create -n ansibleCreds -i https://172.20.65.241:443 -p ansible_tower -a basic
In the example:
credentialsName: Enter a unique name for the credentials. A name can contain a maximum of 30 characters. Enclose the name in double quotes if it contains spaces.
For example, AnsibleTower.
credentialsTargetID: Enter the target identifier based on the credentials provider.
Ensure that you do not provide the same target ID while configuring any other connector.
credentialsProviderID: Enter ansible_tower
Enter one of the following authentication mechanisms with which you want to create the credentials. Plugin supports the following authentication mechanisms:
Authentication Mechanism authenticationType Basic basic Bearer bearer API Key-based apikey Cookie-based cookie
Enter the values for the following parameters when prompted:
user name Enter the Ansible Tower server user name. password Enter password for the user.
Credentials are created successfully.
Optional: To start the plugin as a batch or shell process
After successfully creating the credentials, run the plugin to enable the connector.
- Navigate to the remote-restapi-plugin/config directory, and replace the creds.json file with the creds.json file that you have downloaded while creating the plugin key.
- Run the run.sh script to start the plugin.
Task 5: To test the plugin
BMC recommends that you test whether the plugin is able to connect to the automation tool or application successfully before creating automation policies.
- In the BMC Helix Intelligent Automation console, click Connectors > PluginKeys.
- Click Actions > Test against the plugin that is used to configure the connector.
A message appears that shows that the connection is successful.
The Ansible Tower connector is configured and appears in the Configured Connectors tab with the status as Connected.
If the connector is not successfully connected, the status appear as Disconnected. Click the
icon to view the error message and fix the configuration issue.
Where to go from here
Now that the connector is configured successfully, you can create policies to execute actions supported by Ansible Tower. For more information, see Launching a job template.