Ansible administration is most normally carried out from the command line. Make that process a little bit much more successful with the enable of the website-based GUI, AWX.
If you happen to be an Ansible admin, you are possibly well-versed in the strategies of the command line interface (CLI). But there may well be periods when you very long to have a great GUI to make your admin job a bit easier.
That’s in which Ansible Internet eXecutable (AWX) comes into enjoy. AWX is a no cost/open resource task that will allow you to more easily deal with your Ansible tasks. AWX delivers:
A internet-primarily based interface
Tax motor created on major of Ansible
A potent Rest API
The ability to regulate or sync stock with other cloud expert services
The skill to handle obtain
Integration with LDAP
I’m heading to show you how to set up this strong internet GUI on CentOS 8.
SEE: How to turn out to be a community administrator: A cheat sheet (TechRepublic)
What you will need
How to install the AWX dependencies
The initial factor to consider treatment of is the set up of the dependencies. Log in to your CentOS 8 server, open up a terminal window, and issue the next instructions:
sudo dnf set up epel-launch -y sudo dnf install git gcc gcc-c++ ansible nodejs gettext product-mapper-persistent-facts lvm2 bzip2 python3-pip -y
How to install Docker and Docker Compose
We now will need to set up both of those Docker and Docker Compose. The first point to do is add the needed repository with the command:
sudo dnf config-manager --insert-repo=https://download.docker.com/linux/centos/docker-ce.repo
After the repository is included, put in the hottest variation of Docker with the command:
sudo dnf put in docker-ce-3:18.09.1-3.el7 -y
Begin and enable the Docker motor with the commands:
sudo systemctl start out docker sudo systemctl help docker
Add your consumer to the docker team with the command:
sudo usermod -aG docker $Person
Log out and log back in.
Install docker-compose by means of pip3 with the command:
sudo pip3 put in docker-compose
Ultimately, set python to use Python 3 with the command:
choices --set python /usr/bin/python3
How to set up AWX
Now we can at last install AWX. Clone the hottest release with the command:
git clone https://github.com/ansible/awx.git
Future, generate a top secret encryption critical with the command:
openssl rand -foundation64 30
Duplicate the critical that is produced to your clipboard.
Change into the freshly downloaded AWX listing with the command:
Open the AWX stock file with the command:
In that file, you are going to require to (at a minimal), edit the subsequent configuration possibilities. Very first, identify the line:
In that line, paste the magic formula vital you generated previously.
Future, search for the line:
Adjust the password to a powerful, distinctive password.
Eventually, look for the line that starts with:
Modify that line to:
You can then go through the relaxation of the inventory file and edit as needed. But, the higher than alterations must consequence in a successful set up.
Build a directory for Postgres with the command:
sudo mkdir /var/lib/pgdocker
Put in AWX with the command:
sudo ansible-playbook -i inventory put in.yml
This really should choose about 5 to10 minutes to complete.
How to modify SELinux and the CentOS firewall
Right before we can obtain the AWX web-site, we will need to disable SELinux. Problem the command:
sudo nano /and so on/sysconfig/selinux
Improve the line:
Save and close the file. Restart your process so the alterations will take influence.
The previous stage is to modify the firewall. This is accomplished with the following instructions:
sudo firewall-cmd --zone=public --add-masquerade --long lasting sudo firewall-cmd --permanent --incorporate-support=http sudo firewall-cmd --everlasting --incorporate-services=https sudo firewall-cmd --reload
Last but not least, open a internet browser and level it to http://SERVER_IP (where by SERVER_IP is the IP handle of your hosting server). You will be greeted by the AWX login screen, exactly where you’ll use the admin username and the password you established in the admin_password configuration (Figure A).
Once you authenticate, you are going to come across by yourself in the AWX dashboard, the place you can start performing with Ansible by this person-welcoming internet-based GUI (Figure B).
Congratulations, functioning with Ansible must now be a little bit less difficult.