Ansible Awx Docker
2/13/2022by admin
Install Ansible AWX on Ubuntu 20.04 using Kubernetes
Docker Desktop Stable 2.3.0.2 or later (running Linux containers) Port 80 available on your Windows machine; We will be installing AWX using local Docker. AWX is installed via Ansible itself. Therefore I suggest you follow my previous article on setting up Ansible on WSL. May 24, 2020 Docker is an open-source containerization platform that allows you to quickly build, test, and deploy applications as portable containers that can run anywhere. In this quick tutorial, we will show you how to remove all unused, volumes in Docker. Also, how to remove one or more volume by providing VOLUME NAME. Removing Docker Volumes: 1./.
Page Contents
- Install Ansible AWX on Ubuntu 20.04 using Kubernetes
- Issues

AWX is the upstream open source version of Ansible Tower, you can install it for free and use it for free forever.
To install on Kubernetes I will be using the AWX-Operator

For this tutorial I will be installing on an Ubuntu Desktop 20.04 running on ESXi
I am starting from a clean Ubuntu 20.04 installation and will start with updating the packages.
I also need to install VMWare tools, net-tools, Git SSH and Virtualenv
First step is to setup the repos for Kubernetes and Cubectl
Then we need to make it executable and move it to bin
Then move it to bin so we can run it as any user
Next we need to install minikube
Ansible Awx Docker Upgrade
Next install Docker
Install minikube
There is an issue installing latest version (currently 1.22) so stable version is 1.21 so use this
Later versions might have a fix so the below will probably work.
Ansible Awx Docker Hub
Add user to docker group
Log in and out
Start minikube
Check everything is working with kubectl get pods -A – you should see something like this
Next install the AWX Operator
You can check the installation progress by entering this command
If you type kubectl get pod you should see one something like this
Next you need to create a file called awx-demo.yml and put the following code into it
Now apply that file
You now need to wait a few minutes for the creation – you can check status with this command
Now you need to get the admin password
Ansible AWX is no longer supported on Docker, but if you do need to install it on Docker you have to use V17.01 – details below
Ansible Awx Docker Run
Install Ansible AWX 17.0.1 on Ubuntu 20.04 using Docker
AWX is the upstream open source version of Ansible Tower, you can install it for free and use it for free forever.
Latest repo: https://github.com/ansible/awx
However there is no support. If you want a supported version you need to look at Ansible Tower
For this tutorial I am going to be installing AWX 17.0.1 on an Ubuntu Desktop 20.04 running within VMWare workstation
Full install instructions can always be found here – https://github.com/ansible/awx/blob/devel/INSTALL.md
I am starting from a clean Ubuntu 20.04 installation and will start with updating the packages.
I also need to install VMWare tools, net-tools, Git SSH and Virtualenv
Setup Virtual Environment
We now need to setup a virtual environment
I will make a directory called virtual and then create a virtual environment within that directory called awx
I now need to activate that virtual environment
Your prompt should now change to this
Install Docker
Check Docker version
Install Docker Compose
We now need to install docker-compose, in doing so it will also install Docker, which is also another requirement.
We now need to clone the AWX repository from Github, make sure you drop back to your home directory before doing this otherwise you will get an error saying the folder awx already exists
Edit the Inventory file
You now have a folder called awx and within there a folder called installer and within there an inventory file you need to edit.
You just need to make sure you have set an admin password and we need to change the directory of your virtual environment.
Change # admin_password=password to
Find this line
AWX custom virtual environment folder. Only usable for local install.
custom_venv_dir=/opt/my-envs/ and change the path to /home/roger/virtual/awx (make sure you change your local username!)
Install Ansible
To build AWX you need to have Ansible installed to run the install playbook, make sure you are in your virtual environment and run
Run the install Playbook
You need to be in the inventory folder again
If everything is in place this should run fully – watch out for any red!
This will take a little while (at least 10 minutes) to run through as it has to pull some images from Docker, but once it completes you should be able to type docker ps and see your running containers
You can now log into your AWX – point your browser to the IP address of your AWX
Do an ifconfig to check your IP – then point to http://<your-ip>
You should see this screen
Issues
Docker support has been removed for Ansible AWX so this process might not run for you at a later date if you try to use newer versions.
It is discussed here – https://groups.google.com/g/awx-project/c/47MjWSUQaOc/m/bCjSDn0eBQAJ
Using Ansible for Network Automation is a great to get started with programmability.
AWX will allow you to schedule jobs, and provide an audit path of previously run tasks.
Remember that there is no support with AWX and if you get stuck there is always the Ansible community. If you are looking for a more enterprise friendly tool Ansible Tower might be a better fit, you you do have to pay for a subscription which gets you support.
A lot of companies use AWX with great success, so why not install it and give it a go.
More Ansible Resources:
Comments are closed.