Ansible and Ansible Tower Installation on Ubuntu Server 24.04 LTS

This guide explains the difference between Ansible and Ansible Tower (AWX), followed by step-by-step installation instructions on Ubuntu Server 24.04 LTS.

1. What is Ansible?

Ansible is an open-source IT automation tool used for:

Ansible works agentlessly using SSH and YAML-based playbooks.

2. What is Ansible Tower?

Ansible Tower is the enterprise web-based management platform for Ansible. It provides:

The upstream open-source version of Ansible Tower is called AWX.

3. Difference Between Ansible and Ansible Tower

Feature Ansible Ansible Tower / AWX
Interface CLI Based Web UI + CLI + API
Installation Simple Advanced
Automation Playbooks Centralized Automation Platform
User Management Manual RBAC Support
Job Scheduling Cron Jobs Built-in Scheduler
Inventory Static/Dynamic Files GUI Inventory Management
API Access Limited REST API
Monitoring CLI Output Dashboard Monitoring
Best For Small/Medium Automation Enterprise Automation

Install Ansible on Ubuntu Server 24.04 LTS

4. Prerequisites


- Ubuntu Server 24.04 LTS
- Sudo or root privileges
- Internet connectivity
- SSH enabled
- Minimum 2 GB RAM

5. Update System Packages


sudo apt update && sudo apt upgrade -y

sudo reboot

6. Install Required Packages


sudo apt install -y \
software-properties-common \
wget \
curl \
git \
vim \
python3 \
python3-pip \
openssh-client

7. Add Ansible Repository


sudo add-apt-repository --yes --update ppa:ansible/ansible

8. Install Ansible


sudo apt install -y ansible

9. Verify Ansible Installation


ansible --version

Install Ansible Tower (AWX) on Ubuntu Server 24.04 LTS

10. Install Docker


sudo apt install -y docker.io docker-compose

sudo systemctl enable --now docker

11. Verify Docker Installation


docker --version

docker compose version

12. Install Kubernetes Tools


sudo snap install kubectl --classic

13. Install Minikube


curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64

sudo install minikube-linux-amd64 /usr/local/bin/minikube

14. Start Minikube Cluster


minikube start --driver=docker

15. Install AWX Operator


kubectl create namespace awx

git clone https://github.com/ansible/awx-operator.git

cd awx-operator

make deploy

16. Create AWX Deployment File


vi awx-deploy.yml

17. Example AWX Deployment Configuration


apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
  name: awx
spec:
  service_type: nodeport

18. Deploy AWX


kubectl apply -f awx-deploy.yml -n awx

19. Verify AWX Pods


kubectl get pods -n awx

20. Get AWX Admin Password


kubectl get secret awx-admin-password \
-n awx \
-o jsonpath="{.data.password}" | base64 --decode

21. Get AWX Service Port


kubectl get svc -n awx

22. Access AWX Web Interface


http://SERVER-IP:NODEPORT

23. Default AWX Login


Username: admin
Password: Retrieved from Kubernetes Secret

24. Optional Post Installation Tasks


- Configure Organizations
- Configure Inventories
- Add Credentials
- Create Job Templates
- Configure Git Projects
- Setup LDAP/AD Authentication
- Configure SSL Certificates
- Setup Scheduled Jobs