How to Install Ansible AWX on Ubuntu 24.04

Ansible AWX is a free and open-source web application that provides a user-friendly interface for managing Ansible playbooks and inventories. It also includes a REST API for automating Ansible operations. AWX serves as the open-source version of Red Hat Ansible Tower.

In this post, we will explain how to install Ansible AWX on Ubuntu 24.04. To deploy AWX, a Kubernetes infrastructure such as MicroK8s, K3s, or Minikube is required. In this demo, we will use Minikube, a single-node Kubernetes cluster. Refer to the following URL for Minikube installation:

Prerequisites

Before we get started, ensure that Ubuntu 24.04 system has the following:

  • 8 GB of RAM
  • 3.4 GHz CPU with 2 Cores
  • Hard disk space 20 GB
  • Internet Connection
  • Pre Installed minikube

Let’s jump into Ansible AWX installation steps

1) Install Required Packages

Log in to your Ubuntu system and install following required packages

$ sudo apt install git make -y

2) Start minikube cluster

It is recommended to start the Minikube cluster with 4 CPUs and 8 GB of RAM. If resources are lower than this, the pods may take longer to initialize.

To start the minikube, run following minikube command as regular user,

$ minikube start --vm-driver=docker --addons=ingress

Start Minikube With Ingress Addons For Ansible AWX

Execute beneath commands to verify minikube and pods status

$ minikube status
$ kubectl get pods -A

MiniKube Cluster Status On Ubuntu 24.04

3) Deploy Ansible AWX via Operator

Use following git clone command to get AWX operator,

$ git clone https://github.com/ansible/awx-operator.git
$ cd awx-operator/
$ git checkout 2.19.0

 

Git Clone AWX Operator on Ubuntu 24.04

Note: As of the time of writing this post, the latest version of the AWX Operator was 2.19.0. You can check for the latest version on the official release page: https://github.com/ansible/awx-operator/releases.

Next , set the namespace “ansibe-awx” and run make deploy command

$ export NAMESPACE=ansible-awx
$ make deploy

Install Ansible AWX Operator On Ubuntu 24.04

Next, check the status pods in ansible-awx namespace,

$ kubectl get pods -n ansible-awx

AWX Operator Pod Status on Ubuntu 24.04

Now, copy awx demo file with the name ‘awx-ubuntu.yml’

$ cp awx-demo.yml awx-ubuntu.yml

Edit this file using vi editor, change the name from awx-demo to awx-ubuntu.

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

Save and close the file.

Ansible AWX Yml file Ubuntu 24.04

Deploy AWX using following kubectlc command,

$ kubectl create -f awx-ubuntu.yml -n ansible-awx
awx.awx.ansible.com/awx-ubuntu created
$

Monitor pods and service status of ansible-awx namespace,

$ kubectl get pods -n ansible-awx
$ kubectl get svc -n ansible-awx

Monitor AWX Pods During Deployment

Great, output above confirms that AWX pods and service are up and running.

You can track the installation for AWX from the deployment,

$ kubectl logs -f deployments/awx-operator-controller-manager -c awx-manager -n ansible-awx

4) Access AWX Dashboard

To access the dashboard from Ubuntu system itself, run following command to get dashboard url,

$ minikube service awx-ubuntu-service --url -n ansible-awx
http://192.168.49.2:30770
$

In case, you are trying to access outside of your Ubuntu system then run following kubectl command,

$ kubectl port-forward service/awx-ubuntu-service -n ansible-awx --address 0.0.0.0 10445:80 &> /dev/null &

AWX POD Forwarding Ubuntu 24.04

Open the web browser, type following URL

http://<Your-Ubuntu-IP-Address>:10445

AWX-Login-Page-Minikube-Ubuntu

To retrieve admin user password, run the following kubectl command,

$ kubectl get secret -n ansible-awx | grep -i password
$ kubectl get secret awx-ubuntu-admin-password -o jsonpath="{.data.password}" -n ansible-awx | base64 --decode; echo
4zzsWN4fYJxgidx6cSiYJq3vrPSK6JHR
$

Ansible AWX Admin User Password Ubuntu 24.04

Copy this password string and paste it on password field on AWX login page,

Password-Admin-User-AWX-Minikube

Click on ‘Login In

Ansible-AWX-Dashboard-Minikube-Ubuntu

And that’s it! We have successfully installed Ansible AWX on Ubuntu 24.04. I hope you found this guide helpful and informative. Feel free to share your questions and feedback in the comments section below.

Also Read : How to Run and Schedule Ansible Playbook Using AWX GUI

27 thoughts on “How to Install Ansible AWX on Ubuntu 24.04”

  1. Hey James

    great post so far, i’m up to reviewing the installer process.

    Interestingly there is no installer directory in the awx directory.

    have cross checked with github and there is no installer directory there either.

    any ideas?

    “”Cheers
    G

    1. Hi Gerardo,
      We have fixed the issue that you have mentioned. In place of cloning we have downloaded the AWX zip file from the github. Same steps have been updated in article too.

    2. ‘https://github.com/ansible/awx/blob/devel/CHANGELOG.md’

      Saw some updates from 18 ver-Removed installer directory.

  2. Hey Gerardo, I’m equally stunned to confirm your observation. It appears something changed with the AWX Github repository from the time this guide was published and now. That could be the only plausible explanation. At the time of writing this guide, everything was working as expected.

  3. Thanks for post James, really useful to an AWX beginner like me. I did get stuck when trying to follow Pradeeps post on how to create projects, turns out i had to manually create the /var/lib/awx/projects folder and then uncomment ‘project_data_dir=/var/lib/awx/projects’ in the inventory file. Not sure if thats useful to anyone (i got stuck for a while).

  4. Great post, thanx! Everyting installed, but there is a bug in awx 17.1 – ‘https://github.com/ansible/awx/issues/9043/’
    It’s rather critical when use inventory from git. There is solution to use F12 in browser, but its painful 🙂

    workaround:
    i delete containers docker stop $(docker ps -a -q) && docker rm $(docker ps -a -q)
    and rerun step with git awx download, but use awx 15 version:
    wget ‘https://github.com/ansible/awx/archive/15.0.0.zip’
    edit inv and run, bug is gone.

  5. durga ramakrishna

    Hi James,
    Thanks a lot for the document it really helped me to launch the AWX UI. I tried a lot with minikube with 18.0 and faced lot many issues and finally got yours and saved time as well as me.
    Thanks & Regards,
    Durga cherukuri

  6. I’m facing the below problem while running the install.yml file,

    ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.

    The error appears to have been in ‘/home/saurabh.pande/awx/installer/roles/local_docker/tasks/upgrade_postgres.yml’: line 39, column 3, but may be elsewhere in the file depending on the exact syntax problem.
    The offending line appears to be:
    – name: Stop AWX before upgrading postgres
    ^ here

  7. Hey guys, thank you very much for this guide.
    It saved me alot of time, as I am a linux/ansible/awx beginner.
    I was able to get this running with AWX version 17.0.1 (as described in the post).
    Then I tried to use the current version (19.0.0) and as others already stated, there is no installer folder.
    Does anyone know how to use this guide with newer versions of AWX?
    Thanks very much for any hint on this!

    1. From version 18.x, AWX uses kubernetes/minikube and not docker, so the install procedure is totally different.
      I have hopes that someone might make a howto for setting up awx in a kubernetes cluster, as the cluster is pretty easy to get up and running.

      1. Pradeep Kumar

        Hi Jannis,

        I would be writing a procedure on how to install Ansible AWX 18.x or higher on Minikube soon.

  8. Thanks James for this nice document.
    In this version ‘17.1.0’, I am not able to see the filter option in jog logs output on the dashboard. Is it not part of this version, any idea?

  9. janus barinan

    Help! Followed the steps and I got stuck on Step 7.
    It seemed my instance got hung up. I tried running another ssh session of the instance it does not connect.
    These are the last parts.

    TASK [local_docker : Run migrations in task container] *************************

    ^[[A^[[A^[[A^[[A

    ********
    changed: [localhost]
    ********
    changed: [localhost]
    ********
    changed: [localhost]

    It seems not moving anymore.

    1. Pradeep Kumar

      Hi Janus,

      Is your system have enough resources to run AWX ? By looking at the logs that you have shared is not giving any hint.

  10. Hello,

    This worked great, minus a few hiccups.
    Important notes: If you do not have unzip, you will need to install it – ‘ apt install unzip’. Also before running the inventory playbook, make sure the directory path exists – /var/lib/awx/projects (which is the default path). For some reason, it did not create this path automatically.
    Thanks for this tutorial!

Leave a Comment

Your email address will not be published. Required fields are marked *