# Ansible Tower module

> Configure OneFuse Ansible Tower policies to run API-based, Ansible-powered automation

---

Site [llms.txt](/llms.txt)

---

The OneFuse Ansible Tower module allows admins to create API-based, Ansible-powered services to drive solutions from upstream automation tools or scripts.

OneFuse codeless, policy-based integrations can securely power other automation tools and services such as VMware Aria Automation, Terraform, and others via API.

## Highlights

- Provides control and standardization for resources on both public and private cloud (on-prem) environments.
- OneFuse enables least-privilege access wherein each policy serves as an API-based service, restricted to the specific use cases defined in the policy, without exposing the full Tower API or over-allocating permissions to users or upstream automation tools.
- Each policy defines the automation use case, organization, inventory, specific provisioning and deprovisioning job templates, and overrides.
- In addition to all of this, it offers the added flexibility of allowing the requester to influence the assignments dynamically via templated fields.

## Setup overview

1. In OneFuse, select **Ansible Tower** from **Home**, or select **Modules** > **Ansible Tower** from the left navigation menu.
2. [Create an Ansible Tower Policy](#create-an-ansible-tower-policy).
3. [Enter Lifecycle Job Templates](#enter-lifecycle-job-templates).
4. [Manage Inventory and Inventory Groups](#manage-inventory-and-inventory-groups).
5. Run Ansible Tower Playbooks on Inventory Groups through the [OneFuse API](https://app.swaggerhub.com/apis-docs/cloudbolt/OneFuse/) or an [Upstream Provider](/docs/onefuse/consume/what-is-upstream-provider/).

<div class="alert alert-info" role="alert">


This module requires the Ansible Tower [License](/docs/onefuse/getting-started/manage-license/) in order to execute a Policy to run playbooks on inventories. Ansible Tower Policies, Endpoints, and Module Credentials can be created without a license.
</div>


## Create an Ansible Tower policy

<div class="alert alert-info" role="alert"><div class="h4 alert-heading" role="heading">Prerequisites</div>


Create a [Module Credential](/docs/onefuse/configure/module-credentials/) and [Endpoint](/docs/onefuse/configure/module-endpoints/#ansible-tower) for the selected technology.
</div>


1. In OneFuse, select **Ansible Tower** under **Modules**. Or, select **Modules** > **Ansible Tower** from the left navigation menu.
2. Select **Create** on the top right of the **Ansible Tower Policies** panel.
3. Fill out the [Ansible Tower Policy form](#ansible-tower-policy-form).
4. Input [Lifecycle Job Templates](#enter-lifecycle-job-templates) to provision and/or de-provision the Ansible Tower policy.
5. When finished, select **Create**.

## Edit an Ansible Tower policy

1. In OneFuse, select **Ansible Tower** under **Modules**. Or, select **Modules** > **Ansible Tower** from the left navigation menu.
2. Locate the policy to edit and select the **Edit** icon.
3. Go to the correct tab using the **Next** and **Back** buttons at the top of the page.
4. Select **Update** to save the changes.

## Enter lifecycle job template(s)

OneFuse integration with Ansible introduces lifecycle (provision + deprovision) management as part of the policy service. Lifecycle job templates allow integration into [Upstream Provider](/docs/onefuse/consume/what-is-upstream-provider/) tools that also support lifecycle concepts.

1. From the Ansible Tower Module Page, select **Create** to begin a new Ansible Tower policy. Or, select the **Edit** icon on an existing policy.
2. Select the **Jobs** tab, or **Next: Job(s)**. Input the **Provisioning Job Template(s)** for this Ansible Tower Policy in the fields for Provisioning and Deprovisioning.
3. Select **Update** to save the changes.

## Manage inventory and inventory groups

1. From the Ansible Tower Module Page, select **Create** to begin a new Ansible Tower policy. Or, select the **Edit** icon on an existing policy.
2. Select the **Inventory** tab. Enter the Inventory and/or Inventory Group name(s) as either a mix of static and templated text in the first field, or as an array in the second field provided. To separate the Inventory Group Name(s) use the Inventory Group Separator Character: "/".
3. After entering values in either field, select the **View** icon for a preview of the Inventory Name rendered with the Active Static Property Set, if set.
4. Select **Update** to save the changes.

## Prompt on launch overrides

1. From the Ansible Tower Module Page, select **Create** to begin a new Ansible Tower policy. Or, select the **Edit** icon on an existing policy.
2. Select the **Overrides** tab.
3. Optional: toggle the **Verify Prompt on Launch** button to enable or disable this option. When disabled, OneFuse will not verify that Prompt on Launch for Limit is defined on each Job Template prior to execution.
4. Optional: enter scm branch name using a mix of static and templated text in JSON formatted dictionary. [Allow Branch Override must be enabled at the Ansible Tower side.]
5. Optional: enter extra vars using a mix of static and templated text in JSON formatted dictionary.
6. Select **Save** or **Update** to apply the changes.

## Manage deployments

To manage Ansible Tower deployments, go to **Modules** > **Ansible Tower** and scroll down to **Deployments**. See [Managed object](/docs/onefuse/concepts/managed-object/) for more information.

## Ansible Tower policy form

| Field | Description |
| --- | --- |
| **Ansible Tower Policy Name** | Enter a name for your Ansible Tower policy. |
| **Description - Optional** | Optional. Description for this Ansible Tower policy. |
| **Ansible Tower Endpoint** | Select the Ansible Tower Endpoint for this Ansible Tower Policy, begin typing to filter. |
| **Organization Name** | Enter the Organization Name using a mix of static and templated text. |
