Ansible AWX Installation Using Docker in Ubuntu

Saurabh AdhauSaurabh Adhau
2 min read

Introduction

Ansible AWX is an open-source web-based user interface for managing Ansible projects, playbooks, and workflows. It provides a centralized platform for automating IT tasks and orchestrating deployments. Installing AWX using Docker simplifies the deployment process and allows for easy management of Ansible tasks through a web interface. In this guide, we'll walk through the steps to install AWX on Ubuntu using Docker.

Prerequisites

  • Ubuntu server with sudo privileges.

  • Internet connection to download packages.

  • Basic knowledge of using the command line.

Step 1: Update the System

sudo apt update -y
sudo apt upgrade -y

Step 2: Install Ansible and Dependencies

sudo apt install python-setuptools -y
sudo apt install python3-pip -y
sudo pip3 install ansible

Step 3: Install Docker and Docker Compose

sudo apt install docker docker.io -y
sudo pip3 install docker-compose

Step 4: Add User to Docker Group

sudo usermod -aG docker $USER

Step 5: Install Required Packages

sudo apt install git vim pwgen -y

Step 6: Clone AWX Repository

sudo git clone -b 17.0.1 https://github.com/ansible/awx.git
cd awx/installer

Step 7: Generate Secret Key

pwgen -N 1 -s 30

Step 8: Modify Inventory File

sudo vim inventory

Replace admin_password and secret_key with generated values. Save and exit the editor.

Step 9: Run Ansible Playbook

ansible-playbook -i inventory install.yml

Step 10: Check Running Containers

sudo docker ps

Output:

Step 11: Access AWX Web Interface

In a web browser, navigate to http://localhost. Log in using the admin_user (admin) and admin_password (secret_key) specified in the inventory file.

Conclusion

By following these steps, you have successfully installed Ansible AWX on Ubuntu using Docker. AWX provides a powerful platform for managing and orchestrating Ansible tasks, making it easier to automate IT operations and streamline deployments. With AWX's web interface, you can efficiently manage your Ansible projects and workflows from a centralized location.

21
Subscribe to my newsletter

Read articles from Saurabh Adhau directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Saurabh Adhau
Saurabh Adhau

As a DevOps Engineer, I thrive in the cloud and command a vast arsenal of tools and technologies: โ˜๏ธ AWS and Azure Cloud: Where the sky is the limit, I ensure applications soar. ๐Ÿ”จ DevOps Toolbelt: Git, GitHub, GitLab โ€“ I master them all for smooth development workflows. ๐Ÿงฑ Infrastructure as Code: Terraform and Ansible sculpt infrastructure like a masterpiece. ๐Ÿณ Containerization: With Docker, I package applications for effortless deployment. ๐Ÿš€ Orchestration: Kubernetes conducts my application symphonies. ๐ŸŒ Web Servers: Nginx and Apache, my trusted gatekeepers of the web.