How to install Ansible AWX Tower

The AWX project is how Red Hat and Ansible demonstrate their commitment to creating a world-class open-source project on top of the Ansible Tower codebase.

This installation is based on Ubuntu 24.

[1] Set up user mansible as superuser without password for sudo:

sudo su -
touch /etc/sudoers.d/mansible
echo "mansible ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/mansible

[2] Refresh Ubuntu packages and install all needed software:

apt update
apt -y upgrade
apt install -y apt-transport-https apt-utils bind9-host ca-certificates curl gnupg htop iotop iptraf-ng links lsb-release \
lynx make man-db manpages manpages-dev manpages-posix mc locate net-tools nano nocache pv python-is-python3 screen software-properties-common wget

[3] Install Docker:

apt install -y docker.io
systemctl enable --now docker
usermod -aG docker mansible
newgrp docker

[4] Install kubectl:

curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.31/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
chmod 644 /etc/apt/keyrings/kubernetes-apt-keyring.gpg
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.31/deb/ /' | tee /etc/apt/sources.list.d/kubernetes.list
chmod 644 /etc/apt/sources.list.d/kubernetes.list
apt update
apt install -y kubectl

[5] Install Minikube:

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb
dpkg -i minikube_latest_amd64.deb

[6] Switch to user mansible and start Minikube:

exit
minikube start

[7] Start and access Minikube Kubernetes dashboard:

minikube dashboard --url &
kubectl proxy --address=0.0.0.0 --accept-hosts='.*' &

[8] Access Minikube Kubernetes dashboard via the URL:

http://YOUR_SERVER_IP:8001/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/

[9] Download Ansible AWX Tower:

git clone https://github.com/ansible/awx-operator.git
cd awx-operator
git checkout tags/2.19.1
export VERSION=2.19.1

[10] Create kustomization.yaml in the awx-operator folder:

nano kustomization.yaml

Add this content to the file:

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
  - github.com/ansible/awx-operator/config/default?ref=2.19.1

images:
  - name: quay.io/ansible/awx-operator
    newTag: 2.19.1

namespace: awx

[11] Apply the kustomization.yaml:

kubectl apply -k .

[12] Create the awx.yml file:

nano awx.yml

Add this content to the file:

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

[13] Add the new file to the list of resources in kustomization.yaml:

...
resources:
  - github.com/ansible/awx-operator/config/default?ref=<tag>
  # Add this extra line:
  - awx.yml
...

[14] Apply the changes:

kubectl apply -k .

[15] Wait for the pods to spin up:

… just wait a bit ;)

[16] Forward Ansible AWX ports:

kubectl port-forward -n awx service/awx-service --address YOUR_SERVER_IP 8080:80 &> /dev/null &

[17] Get the admin password:

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

[18] Log in to Ansible AWX Tower with the admin user:

http://YOUR_SERVER_IP:8080

HAPPY mansibling!!!