How to Install Ansible AWX Tower on Ubuntu 20.04 Server (Tutorial). In this tutorial we will introduce Ansible AWS with it’s main features then move onto installation phase using Ansible, Docker and Docker Compose.
AWX is an open source project built on top of Ansible. It provides a web based control panel to manage Ansible playbooks, inventories, secrets, and scheduled jobs. It is very useful to test Ansible in local environment.
What Is Ansible AWX?
Ansible AWX is an open source freely available project used for testing. You can use it in any environment such as lab or development. It is considered the foundation of the Ansible Tower.
It is a development branch code that undergoes only required testing and quality engineering testing. Usually, enterprises find adoption difficult due to a lack of signed images being used, real visioning presented with upgrades and the support offered.
However, when IT teams use AWX, a web based solution of Ansible tool, their work becomes more comfortable. They consider it a hub for every automation task. It also constitutes Rest API, a browser that enables you o control access, graphically manage or sync inventory with several cloud sources, log all your jobs, and integrate with Lightweight Directory Access Protocol (LDAP) appropriately.
AWX is built with the purpose to run on top of the Ansible projects, thereby optimizing the already sturdy automation engine. With the help of Ansible AWX, you can enjoy the following benefits:
Delegate
With the help of AWX, you can create users and group them into a single team to whom you can further provide access and rules to inventory, credentials, and playbook at individual levels or team levels. This way, you can effortlessly set up push button access to complex automation and even control it (i.e., who can use it or when they can run it).
For instance, if you need to stand up a new environment, you don’t have to invest your time in adding another task to your already overbooked schedule. Rather, all you need to do is authorize your team to log into AWX and enable them to run provisioning on their own. AWX can also elicit parameters, providing sales and reasonable choices.
Schedule Workflow
Ansible AWX helps you build a job template by bringing credentials, playbooks and inventories together. This template represents a command line execution of the ansible playbook. You don’t have to touch the command line, though. It allows you to run your job template on demand and watch real time playbook output in your web browser. You can also schedule it to run later and acquire complete access to the output whenever required.
Additionally, for running a single playbook, you can effortlessly create a job template with the workflow editor that chains several playbook to run together.
Access Reporting
When you have users, you only require tools for tracking playbook runs and troubleshooting problems. With the help of AWX, you can add a custom callback plugin to Ansible Playbook run so that it captures events and outputs data in real time. You can attain a high level summary of the stored output through a dashboard. It also provides an overview of job execution, failures and success as well as a breakdown of inventory success and failure. This way, you will know the type of playback you want to run and learn about any trouble spots that require immediate attention.
At its playbook level, you will be able to access the results and outputs down to individual tasks on a specific host. Therefore, if your development team tried to create an environment that does not provide the way it is expected, you can immediately troubleshoot and correct the problem.
Automate Via API
As discussed above, AWX constitutes a sturdy restful API, which enables the user interface to communicate with the backend. It demonstrates its power and completeness. Anything you perform in the web browser is affected through API calls. And since it is fully browsable and self documenting, you can access the working of your IT organizations appropriately.
Follow this post to explain how to install the Ansible AWX tower on Ubuntu 20.04 server.
A server running Ubuntu 20.04 operating system along with ssh access.
A root user or a user with sudo privileges.
Minimum 4 GB of RAM with 2 Cores CPU.
Install Docker Engine
Before starting, you will need to install the Docker CE on your server. By default, the latest version of Docker CE is not included in the Ubuntu default repository so you will need to add the Docker’s official repository on your server.
First, install the required dependencies using the following command:
Next step in how to Install Ansible AWX Tower on Ubuntu 20.04 Server is to install Docker.
Install Docker Compose
You will also need to install the Docker Compose to your server. By default, the Docker Compose is available in the Ubuntu default repository. You can install it using the following command:
apt install docker-compose -y
Once the Docker Compose is installed, you can verify the installation using the following command:
docker-compose version
You will get the following output:
docker-compose version 1.25.0, build unknown
docker-py version: 4.1.0
CPython version: 3.8.10
OpenSSL version: OpenSSL 1.1.1f 31 Mar 2020
You will also need to install the Ansible on your server. By default, the Ansible package is included in the Ubuntu default repository. You can install it using the following command:
apt install ansible -y
Once the Ansible is installed, you can verify Ansible installation using the following command:
Save and close the file when you are finished. Next, run the following to install the Ansible AWX Tower:
ansible-playbook -i inventory install.yml
Once the Ansible Tower is installed. You can verify the running container using the following command:
docker ps
You should see all running container in the following output:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8e210d7f15db ansible/awx:17.1.0 "/usr/bin/tini -- /u…" 46 seconds ago Up 43 seconds 8052/tcp awx_task
db01e784479f ansible/awx:17.1.0 "/usr/bin/tini -- /b…" 3 minutes ago Up 42 seconds 0.0.0.0:80->8052/tcp, :::80->8052/tcp awx_web
330cf7a6e81e postgres:12 "docker-entrypoint.s…" 3 minutes ago Up 42 seconds 5432/tcp awx_postgres
3f4ccefd5395 redis "docker-entrypoint.s…" 3 minutes ago Up 43 seconds 6379/tcp awx_redis
To see all downloaded Docker images, run the following command:
docker images
You should see the following output:
REPOSITORY TAG IMAGE ID CREATED SIZE
postgres 12 bc02a3fd9d66 7 days ago 373MB
redis latest 53aa81e8adfa 7 days ago 117MB
centos 8 5d0da3dc9764 8 months ago 231MB
ansible/awx 17.1.0 599918776cf2 15 months ago 1.41GB
We have followed the steps in How to Install Ansible AWX Tower on Ubuntu 20.04 Server and now it is time to access Ansible.
1.Open your web browser and access the Ansible AWX web interface using the URL http://your-server-ip. You will be redirected to the Ansible AWX login page:
2.Provide your admin username, password, and click on the LogIn button. You should see the Ansible AWX dashboard on the following page:
How to Install Ansible AWX Tower on Ubuntu 20.04 Server Conclusion
In this post, we have explained how to install Ansible AWX Tower on Ubuntu 20.04 server. Using Ansible for Network Automation is great to get started with programmability. AWX will allow you to schedule jobs and provide an audit path of previously run tasks. You can now explore Ansible AWX to automate your infrastructure.
I am a fan of open source technology and have more than 10 years of experience working with Linux and Open Source technologies. I am one of the Linux technical writers for Cloud Infrastructure Services.
51vote
Article Rating
Subscribe
Login and comment with
I allow to create an account
When you login first time using a Social Login button, we collect your account public profile information shared by Social Login provider, based on your privacy settings. We also get your email address to automatically create an account for you in our website. Once your account is created, you'll be logged-in to this account.
DisagreeAgree
Login and comment with
I allow to create an account
When you login first time using a Social Login button, we collect your account public profile information shared by Social Login provider, based on your privacy settings. We also get your email address to automatically create an account for you in our website. Once your account is created, you'll be logged-in to this account.