Table of contents
- Introduction
- Step 1: Update the System
- Step 2: Install Ansible and Dependencies
- Step 3: Install Docker and Docker Compose
- Step 4: Add User to Docker Group
- Step 5: Install Required Packages
- Step 6: Clone AWX Repository
- Step 7: Generate Secret Key
- Step 8: Modify Inventory File
- Step 9: Run Ansible Playbook
- Step 10: Check Running Containers
- Step 11: Access AWX Web Interface
- Conclusion
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.