---
title: "Ansible Tower Basics for Easy Playbook and Inventory Management"
description: "Master Ansible Tower for effortless playbook and inventory management, elevating your automation skills to the next level with practical, user-friendly strategies."
canonical: "https://adamtheautomator.com/ansible-tower/"
---

# Ansible Tower Basics for Easy Playbook and Inventory Management

> Master Ansible Tower for effortless playbook and inventory management, elevating your automation skills to the next level with practical, user-friendly strategies.

Source: https://adamtheautomator.com/ansible-tower/

---

ATA Learning

Tap to hide

[

ATA Learning

](/)

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Search for:  

*   [](https://twitter.com/adbertram)
*   [](https://github.com/Adam-the-Automator)
*   [](https://www.linkedin.com/company/adam-the-automator-llc)
*   [](/feed/)

![Ansible Tower Basics for Easy Playbook and Inventory Management](https://adamtheautomator.com/wp-content/uploads/2022/05/Manage-Playbooks-and-Inventories-Easily-with-Ansible-Tower.jpg)

# Ansible Tower Basics for Easy Playbook and Inventory Management

[![](https://secure.gravatar.com/avatar/2beb65fca997135120ed98dc6a2e57dcdf1a7d7d2f5ff687b5d91dc7ccd7a6b5?s=192&d=mm&r=g)Sagar](https://adamtheautomator.com/author/shanky-mendiratta/)14 February 20247 min. read

Categories: [IT Ops](/category/it-ops/)

Tags:[Ansible](/tag/ansible/)

Table of Contents

*   [Prerequisites](#prerequisites)
*   [Installing Ansible Tower and Managing DB Credentials](#installing-ansible-tower-and-managing-db-credentials)
*   [Configuring the Ansible Tower](#configuring-the-ansible-tower)
*   [Creating and Managing Inventories](#creating-and-managing-inventories)
*   [Creating Users in Ansible Tower](#creating-users-in-ansible-tower)
*   [Creating and Running a Job](#creating-and-running-a-job)
*   [Conclusion](#conclusion)

Are you tired of managing dozens of your [Ansible playbooks](https://docs.ansible.com/ansible/latest/playbook_guide/playbooks.html) and hosts? But why make things difficult when you can use [Ansible Tower](https://docs.ansible.com/ansible/latest/reference_appendices/tower.html#:~:text=Ansible%20Tower%20\(formerly%20%27AWX%27,all%20of%20your%20automation%20tasks.)? Ansible Tower is designed to make running playbooks and managing hosts easier with Ansible.

In this tutorial, you will learn how to install, configure, and use the Ansible Tower product to your advantage.

Level up how you manage Ansible with Ansible Tower today!

## Prerequisites

This tutorial comprises step-by-step instructions. If you’d like to follow along, be sure you have the following in place:

*   An [Ansible controller host](https://docs.ansible.com/ansible/latest/installation_guide/index.html) – This tutorial uses Ansible v2.11.7 on a [Red Hat Enterprise Linux 8.4](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8) machine.

Related:[Guide: How to Setup Ansible (Ubuntu, RHEL, CentOS, macOS)](https://adamtheautomator.com/install-ansible/)

*   Python v3.6 or later installed on your Ansible controller host machine. This tutorial uses Python v3.8.10.

Related:[How Do You Install Python 3.6?](https://adamtheautomator.com/install-python-36/)

## Installing Ansible Tower and Managing DB Credentials

Ansible Tower lets you manage Ansible in an interactive web interface, but you’ll first have to install Ansible Tower on your machine and manage its credentials to access it.

There are two ways to install Ansible Tower:

*   Installing on a single machine.
*   Installing in [Multi-Machine Cluster](https://access.redhat.com/documentation/en-us/red_hat_ansible_automation_platform/2.0-ea/html/red_hat_ansible_automation_platform_installation_guide/assembly-multi-machine-cluster-scenario) with an externally managed database.

But in this tutorial, you’ll install Ansible Tower on a single Ubuntu machine:

1\. Connect to your Ansible controller on a Linux host with your favorite SSH client.

2\. Next, run the following commands to update proper sources and install dependent packages (epel-release curl).

```bash
sudo yum update 
sudo yum -y install epel-release curl
```

![Updating Packages and Installing Dependencies](https://adamtheautomator.com/wp-content/uploads/2022/05/image-678.png)

Updating Packages and Installing Dependencies

> _The [apt or apt-get](https://guide.ubuntu-fr.org/server/apt.html) command installs the packages from apt software repositories configured in Ubuntu._

3\. Create a directory named _~/ansible\_tower\_demo_ and switch to that directory. This directory will hold this tutorial’s installation files

```bash
# Create the ~/ansible_tower_demo directory
mkdir ~/ansible_tower_demo
# Change the working directory
cd ~/ansible_tower_demo
```

4\. Now, run the below [yum install](https://www.linuxfordevices.com/tutorials/centos/yum-command#dff5e9f6-d3ed-44f0-a9b9-9bac542719aa) command to install the PostgreSQL database where Ansible Tower can store data.

```bash
sudo yum install postgresql postgresql-contrib
```

![Installing the PostgreSQL Database](https://adamtheautomator.com/wp-content/uploads/2022/05/image-679.png)

Installing the PostgreSQL Database

Related:[Learn How to Install PostgreSQL on a Ubuntu Linux Server](https://adamtheautomator.com/install-postgresql-on-a-ubuntu/)

5\. Execute the curl command below to download the Ansible Tower package from the Ansible release site. At the time of writing, the latest release is 3.7.3-1.

This command downloads a _.tar_ file of Ansible Tower on your machine, which you’ll unzip in the following step.

```bash
curl -O https://releases.ansible.com/ansible-tower/setup/ansible-tower-setup-3.7.3-1.tar.gz
```

![Downloading the latest Ansible Tower on the Linux machine](https://adamtheautomator.com/wp-content/uploads/2022/05/image-680.png)

Downloading the latest Ansible Tower on the Linux machine

6\. Next, run the following tar command to unzip Ansible Tower’s _.tar.gz_ file you downloaded in step five.

```bash
tar xvfz ansible-tower-setup-3.7.3-1.tar.gz
```

![Unzipping the Ansible Tower Archive](https://adamtheautomator.com/wp-content/uploads/2022/05/image-681.png)

Unzipping the Ansible Tower Archive

Related:[Learn How to Zip and Unzip Files in Linux and be a Zip Master](https://adamtheautomator.com/unzip-files-in-linux/)

7\. After unzipping the file, run the ls command to verify the package.

```bash
ls
```

If you successfully unzipped the package, you’ll see the Ansible Tower directory below (ansible-tower-setup-3.7.3.1).

![Verifying the Ansible Tower Directory](https://adamtheautomator.com/wp-content/uploads/2022/05/image-682.png)

Verifying the Ansible Tower Directory

8\. Run each command below to change your current directory to the Ansible Tower setup package directory and open the inventory file in a text editor (vi).

```powershell
cd ansible-tower-setup-3.7.3-1
vi inventory
```

Change the values in the inventory file as follows.

```powershell
[tower]
localhost ansible_connection=local
[database]
[all:vars]
# Adding the admin password of the Ansible Tower
admin_password='password'
# Adding the Database name which will store data of the Ansible Tower
pg_database='awx'
# Adding the Database username
pg_username='admin'
# Adding the Database password of the Ansible Tower
pg_password='password'
# Adding the SSL Mode of the Database to 'verify-full' for client-side enforced SSL
pg_sslmode='prefer'
```

9\. Finally, run the setup shell script (setup.sh) to start the Ansible Tower in the same directory (./). The setup takes at least two-three minutes to complete.

```powershell
./setup.sh
```

As you can see below, the Ansible Tower setup has been completed.

![Running the Ansible Tower on Linux Machine](https://adamtheautomator.com/wp-content/uploads/2022/05/image-683-1024x143.png)

Running the Ansible Tower on Linux Machine

Related:[Your One and Only Linux Shell Scripting Tutorial](https://adamtheautomator.com/linux-shell-scripting-tutorial/)

## Configuring the Ansible Tower

You’ve successfully installed Ansible Tower, but you still have to configure the correct passwords and configurations before using Ansible Tower.

To configure Ansible Tower, you’ll need a license, and a free trial license will suffice:

1\. Open your favorite web browser and navigate to _https://Tower-Server-Name/._ Replace _Tower-Server-Name_ with your server’s IP address_._ You’ll get to the Ansible Tower login page if all goes well, as shown below.

Provide your username (admin) and password (password), which you configured in [step eight](https://adamtheautomator.com/ansible-tower/#inventory_file) of the “Installing Ansible Tower and Managing DB Credentials” section, and click on **SIGN IN**.

After signing in, your browser redirects to the TOWER LICENSE page (step two).

> _Ansible Tower automatically installs a self-signed certificate for HTTPS communication, which may require acceptance in your browser._

Related:[Activating NGINX to Redirect HTTP to HTTPS Traffic](https://adamtheautomator.com/nginx-to-redirect-http-to-https/)

![Logging Into the Ansible Tower UI ](https://adamtheautomator.com/wp-content/uploads/2022/05/image-684.png)

Logging Into the Ansible Tower UI

2\. On the TOWER LICENSE page, click on the REQUEST LICENSE button to request a license. Your browser redirects to the Red Hat Ansible Automation Platform Trial page (step three).

![Requesting the Ansible Tower License ](https://adamtheautomator.com/wp-content/uploads/2022/05/image-685.png)

Requesting the Ansible Tower License

3\. Next, click on the START YOUR TRIAL button, as shown below, to start your trial.

![Starting a Red Hat Ansible Automation Platform Trial](https://adamtheautomator.com/wp-content/uploads/2022/05/image-686.png)

Starting a Red Hat Ansible Automation Platform Trial

4\. Now, enter your Red Hat login/email and password and click Log in, as shown below. You’ll receive a pop-up window where you can choose a license to select (step five).

![Providing the Red Hat Username and Password](https://adamtheautomator.com/wp-content/uploads/2022/05/image-687.png)

Providing the Red Hat Username and Password

5\. Lastly, choose the 60-Day Product Trial, click on the SELECT button, and your Ansible Tower Dashboard will appear.

![Updating the License in the Ansible Tower](https://adamtheautomator.com/wp-content/uploads/2022/05/image-688.png)

Updating the License in the Ansible Tower

After selecting a license, you’ll get to the Ansible Tower UI shown below.

![Viewing the Ansible Tower Dashboard](https://adamtheautomator.com/wp-content/uploads/2022/05/image-689.png)

Viewing the Ansible Tower Dashboard

## Creating and Managing Inventories

After you’ve successfully installed Ansible Tower Dashboard UI, you’re now ready to manage multiple components of Ansible. For starters, you’ll create and manage inventories in the Ansible Tower.

1\. On the Ansible Tower Dashboard, click on Inventories to open the inventories list stored in the Ansible Tower.

Ignore the Demo Inventory, and click on the green plus (+) button to add a new inventory.

![Adding a New Inventory](https://adamtheautomator.com/wp-content/uploads/2022/05/image-690.png)

Adding a New Inventory

2\. Next, on the CREATE INVENTORY page, specify the below parameters and click on the SAVE button (bottom-right) to save the new inventory:

*   **NAME** – **ATA Learning** (You can provide a different name as you like).
    
*   **DESCRIPTION** – Describe the inventory, so it’s easy to recognize among many inventories.
    
*   **ORGANIZATION** – Choose the **Default** option. Ansible Tower creates a default organization automatically, but you can also create your own.
    
*   **VARIABLES –** Provide variables in YAML or JSON format.
    

![Creating your First Inventory in Ansible Tower Dashboard](https://adamtheautomator.com/wp-content/uploads/2022/05/image-691.png)

Creating your First Inventory in Ansible Tower Dashboard

3\. Finally, verify the newly-created inventory on the INVENTORIES page shown below.

![Verifying Newly-created Inventory](https://adamtheautomator.com/wp-content/uploads/2022/05/image-692.png)

Verifying Newly-created Inventory

## Creating Users in Ansible Tower

Apart from an administrator (default), do you know how one can access Ansible Tower? By adding users with appropriate permissions and credentials. Adding users is similar to adding inventories, so long as you have access to an administrator user.

Navigate to the **Users** tab, and click on the green plus (**+**) button to create a new user.

![Adding a User in Ansible Tower](https://adamtheautomator.com/wp-content/uploads/2022/05/image-693.png)

Adding a User in Ansible Tower

Now, provide the required user details like in the image below. Set the user’s permission under **USER TYPE**, and click on the **SAVE** button to save the new user.

![Providing the details of the user in Ansible Tower](https://adamtheautomator.com/wp-content/uploads/2022/05/image-694.png)

Providing the details of the user in Ansible Tower

After saving the user details, apart from the admin user, you’ll see the newly-created user in the **Users** list, as shown below.

![Verifying the user in the Ansible Tower](https://adamtheautomator.com/wp-content/uploads/2022/05/image-695.png)

Verifying the user in the Ansible Tower

## Creating and Running a Job

You previously created an inventory (ATA Learning), but right now, it’s just sitting there and is useless unless you call it with a job. A job is an instance of Tower launching an Ansible playbook against an inventory of hosts.

To see how jobs work, create a job in Ansible Tower with the following:

1\. Run the commands below to create a playbooks directory within the /var/lib/awx/projects directory.

This directory will contain all the playbooks that you’ll configure in your job in Ansible Tower.

```powershell
# Create directory
mkdir /var/lib/awx/projects/playbooks
# Change working directory
cd /var/lib/awx/projects/playbooks
```

2\. Next, create a playbook file named _ata.yml_ with your editor in the working directory, and populate the below code to the _ata.yml_ file.

The below Ansible Playbook contains a task to list the directories and files of your current working directory and output it on the screen once the playbook is executed.

```powershell
---
  - name: "Playing with Ansible"
    hosts: localhost
    connection: local
    tasks:

    - name: "just execute a ls -lrt command"
      shell: "ls -lrt"
      register: "output"

    - debug: var=output.stdout_lines
```

3\. Click on the Projects tab to access the lists of available projects, then click on the green plus (+) button to create a new project.

![Creating a new project in the Ansible Tower](https://adamtheautomator.com/wp-content/uploads/2022/05/image-696.png)

Creating a new project in the Ansible Tower

4\. Provide the project details with the following, and click on the **SAVE** button to save the new project:

*   **NAME** – Provide a project name as you like, but this tutorial’s project is named **myproject**.
    
*   **DESCRIPTION** – Adding a description is optional, but it helps identify your project from too many.
    
*   **SCM TYPE** – Set the SCM TYPE to Manual. With this option, you’ll create an Ansible Playbook manually on your Ubuntu machine instead of invoking it from any public or private repository.
    
*   **PLAYBOOK DIRECTORY –** Set the value to the directory you created inside the _/var/lib/awx/projects_ directory in step one (playbooks).
    

![Creating a New Project](https://adamtheautomator.com/wp-content/uploads/2022/05/image-697.png)

Creating a New Project

5\. Navigate to Templates in the left sidebar, click on the plus button (+) like as you did in creating a project to add a new job template

Fill up the template form as follows:

*   **NAME** – Set a job name you prefer, but this tutorial’s choice is **myjob**.
    
*   **JOB TYPE** – Set the action the job will take (**Run**).
    
*   **INVENTORY** – Choose the inventory you created in [step two](https://adamtheautomator.com/ansible-tower/#inventory_page) of the “Creating and Managing Inventories” section (**ATA Learning**).
    
*   **PROJECT** – Specify the project’s name (**myproject**) you created in step four.
    
*   **PLAYBOOK –** Input the playbook file (ata.yml) you created in step two.
    

![Creating the New Job Template](https://adamtheautomator.com/wp-content/uploads/2022/05/image-698.png)

Creating the New Job Template

Once you’re happy with the job details, click on the SAVE button (bottom-right) to save the job.

![Saving the New Job Template](https://adamtheautomator.com/wp-content/uploads/2022/05/image-699.png)

Saving the New Job Template

6\. Finally, navigate to the JOB TEMPLATES page, and click on the launch button, as shown below, to run the newly-created job.

![Running the Newly-created Job](https://adamtheautomator.com/wp-content/uploads/2022/05/image-700.png)

Running the Newly-created Job

As you can see below, the job ran successfully on localhost and listed all files within the directory specified in the playbook.

![Viewing the Job Run](https://adamtheautomator.com/wp-content/uploads/2022/05/image-701.png)

Viewing the Job Run

## Conclusion

In this tutorial, you’ve learned that the Ansible Tower is a great way to manage your Ansible Inventories and Jobs. You’ve also realized the Ansible Tower UI’s exceptional effectiveness in executing playbooks by running jobs.

Now, why not add more control to how you manage your playbooks? Perhaps learn [how to work with Ansible when and other conditionals](https://adamtheautomator.com/ansible-when/)?

Share this article

[Share on X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fadamtheautomator.com%2Fansible-tower%2F&text=Ansible%20Tower%20Basics%20for%20Easy%20Playbook%20and%20Inventory%20Management)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fadamtheautomator.com%2Fansible-tower%2F)[Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fadamtheautomator.com%2Fansible-tower%2F)

## Related Posts

![](https://adamtheautomator.com/wp-content/uploads/2022/08/How-to-Manage-Services-With-the-Ansible-Service-Module.jpg)

### [How to Manage Services With the Ansible Service Module](/ansible-service/)

Learn how to manage, control, and integrate OS services with the Ansible Service module in this ATA Learning tutorial!

![](https://adamtheautomator.com/wp-content/uploads/2022/05/Secure-Your-Secrets-With-Ansible-Vault.jpg)

### [Secure Your Secrets With Ansible Vault](/ansible-vault/)

Make sure your playbook and environment secrets are secure with the Ansible Vault and level up your playbooks in this ATA Learning tutorial!

![](https://adamtheautomator.com/wp-content/uploads/2022/05/Discovering-the-Ansible-Hosts-File.jpg)

### [Discovering the Ansible Hosts File](/ansible-hosts-file/)

Discover and learn best practices for managing inventory with the Ansible Hosts File in this tutorial from ATA Learning.

## Categories

*   [IT Ops](/category/it-ops/)
*   [Cloud](/category/cloud/)
*   [DevOps](/category/devops/)
*   [Home Ops](/category/home-ops/)
*   [Information Security](/category/infosec/)
*   [Software Development](/category/software-development/)

## Site

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Copyright 2026© ATA Learning | [Privacy Policy](/privacy/)
