Skip to main content
Version: Early Access

Ansible Automation Controller Plugin

The Ansible Automation Controller plugin is developed to integrate Ansible Automation Platform Controller API with Digital.ai Release. It acts as a bridge between Digital.ai Release, a comprehensive release orchestration solution, and Ansible Tower (Ansible Automation Platform Controller). It allows users to incorporate Ansible Tower tasks and playbooks directly into their release pipelines, ensuring smooth integration of infrastructure provisioning, configuration management, and application deployments.

Prerequisites

Before you set up the Ansible Automation Controller plugin, ensure you have:

Set Up a Connection to the Ansible Automation Platform Controller

To set up a connection to the Ansible Automation Platform Controller:

  1. From the navigation pane, select Configuration > Connections.

  2. Under HTTP Server Connections, next to Ansible Automation Platform Controller: Server, click Add button.

  3. Configure the connection with the following fields:

    FieldDescription
    Title*Symbolic name for the configuration
    URL*Address where the server can be reached
    AAP 2.5 or LaterSelect this checkbox to use the new API for Ansible Automation Platform version 2.5 or later. Default is unchecked (uses the older API)
    UsernameLogin user ID on the server
    PasswordLogin user password on the server
    API TokenAPI token generated from the Ansible Automation Platform. Username is required if using API Token
    Proxy hostHTTP proxy host
    Proxy portHTTP proxy port
    Proxy usernameHTTP proxy username
    Proxy passwordHTTP proxy password
    Proxy domainDomain to be used for NTLM proxy authentication
  4. Click Test to verify the connection.

  5. Click Save to save the configuration.

image

Available Tasks

The Ansible Automation Controller plugin includes the following tasks:

Run Job Template

Use the Run a Job Template task to execute a job template in the Ansible Automation Platform Controller.

To add a Run a Job Template task:

  1. In your release template, add a task of type Ansible Automation Controller: Run Job Template.
  2. Configure the task with the options described in the following table.
  3. Save the task.

Input Properties

OptionDescription
Server *Ansible Automation Platform Controller server connection. Select from the dropdown or create a new connection if you don't have one
UsernameOverwrites username if defined in the connection form
PasswordOverwrites password if defined in the connection form
Api tokenOverwrites API token if defined in the connection form
Job Template ID *The ID of the job template to run
Extra_varsA string that represents a JSON or YAML formatted dictionary (with escaped parentheses) which includes variables given by the user, including answers to survey questions
Is WorkflowCheck this if it's a workflow job template

Output Properties

PropertyDescription
API responseThe ID of the job that was launched
Job idThe current status of the job

image

image

Wait for Job Status

Use the Wait for Job Status task to monitor and wait for a job to complete in the Ansible Automation Platform Controller.

To add a Wait for Job Status task:

  1. In your release template, add a task of type Ansible Automation Controller: Wait for Job Status.
  2. Configure the task with the options described in the following table.
  3. Save the task.

Input Properties

OptionDescription
Server *Ansible Automation Platform Controller server connection
UsernameOverwrites username if defined in the connection form
PasswordOverwrites password if defined in the connection form
Api tokenOverwrites API token if defined in the connection form
Job ID *The ID of the job to monitor
Max_retriesDefines maximum retries. The default value is infinity
Wait_interval *Defines the wait interval in seconds
Stop On FailureIf selected, it fails the task when the job fails
Is workflowCheck this if it's a workflow job template

Output Properties

PropertyDescription
Job OutputDetailed information about the job execution
Job StatusThe final status of the job

image

image

Run Job Template and Wait for Status

Use the Run Job Template and Wait for Status task to execute a job template and wait for its completion in a single task. This task combines the functionality of the Run Job Template and Wait for Job Status tasks.

To add a Run Job Template and Wait for Status task:

  1. In your release template, add a task of type Ansible Automation Controller: Run and Wait.
  2. Configure the task with the options described in the following table.
  3. Save the task.

Input Properties

OptionDescription
Server *Ansible Automation Platform Controller server connection
UsernameOverwrites username if defined in the connection form
PasswordOverwrites password if defined in the connection form
Api tokenOverwrites API token if defined in the connection form
Job Template ID *The ID of the job template to run
Extra_varsA string that represents a JSON or YAML formatted dictionary (with escaped parentheses) which includes variables given by the user, including answers to survey questions
Max_retriesDefines maximum retries. The default value is infinity
Wait_interval *Defines the wait interval in seconds
Stop On FailureIf selected, it fails the task when the job fails
Is workflowCheck this if it's a workflow job template

Output Properties

PropertyDescription
Job OutputDetailed information about the job execution
Job IDThe ID of the job that was launched
Job StatusThe final status of the job

image

image

Get Information

Use the Get Information task to retrieve information from a specific Ansible Automation Platform Controller API endpoint.

To add a Get Information task:

  1. In your release template, add a task of type Ansible Automation Controller: Get Information.
  2. Configure the task with the options described in the following table.
  3. Save the task.

Input Properties

OptionDescription
Server *Ansible Automation Platform Controller server connection
UsernameOverwrites username if defined in the connection form
PasswordOverwrites password if defined in the connection form
API tokenOverwrites API token if defined in the connection form
API Endpoint *API endpoint to query (example: /api/v2/me)

Output Properties

PropertyDescription
API OutputJSON response from the API endpoint

image

Inventory List

Use the Inventory List task to retrieve the list of inventories from the Ansible Automation Platform Controller.

To add a Inventory List task:

  1. In your release template, add a task of type Ansible Automation Controller: Inventory List.
  2. Configure the task with the options described in the following table.
  3. Save the task.

Input Properties

OptionDescription
Server *Ansible Automation Platform Controller server connection
UsernameOverwrites username if defined in the connection form
PasswordOverwrites password if defined in the connection form
Api tokenOverwrites API token if defined in the connection form
FilterFilters the inventory list. Leave empty to get the whole list. Example: ?page=1

Output Properties

PropertyDescription
API OutputList of inventories with their details

image

Add/Remove Credential

Use the Add/Remove Credential task to associate or disassociate a credential from a job template in the Ansible Automation Platform Controller.

To add an Add/Remove Credential task:

  1. In your release template, add a task of type Ansible Automation Controller: Add/Remove Credential.
  2. Configure the task with the options described in the following table.
  3. Save the task.

Input Properties

OptionDescription
Server *Ansible Automation Platform Controller server connection
UsernameOverwrites username if defined in the connection form
PasswordOverwrites password if defined in the connection form
Api tokenOverwrites API token if defined in the connection form
Job Template ID *The ID of the job template
Credential ID *ID of the credential to add or remove
RemoveCheck this if you want to disassociate the credential from the job template

Output Properties

PropertyDescription
API StatusAPI resopnse status code

image