Ansible Tower, AWX is a web-based solution that makes Ansible even more easy to use for IT teams of all kinds. It’s designed to be the hub for all of your automation tasks.
The Tower, helps you to manage your entire infrastructure by easily pull inventory from public cloud providers such as Amazon Web Services, Microsoft Azure. Further, launching Playbooks with just a single click or even by scheduling jobs.
Ansible Tower is free for usage for up to 10 nodes. To find out more about Tower features and editions, visit the offical Ansible Tower Website
In this quick tutorial, we will show you how to install Ansible Tower very easily on Centos 7 / RHEL 7 System.
Requirements
Ansible Tower has the following requirements:
- Supported Operating Systems: Red Hat Enterprise Linux 6/7, CentOS 6/7
- The latest stable release of Ansible
- 2 GB RAM minimum
- 20 GB hard disk
Install Ansible Tower On CentOS / RHEL
01- Install the EPEL Release repository:
$ yum install -y epel-release
02- Download the latest Ansible Tower package:
$ cd /tmp $ curl -O https://releases.ansible.com/ansible-tower/setup/ansible-tower-setup-latest.tar.gz
03- Untar and unzip the package file:
$ tar xvfz /tmp/ansible-tower-setup-latest.tar.gz
04- Change directories into the Ansible Tower setup package as below:
$ cd /tmp/ansible-tower-setup-*/
05- Open the inventory
file and fill out the below variables admin_password
, pg_password
and rabbitmq_password
:
$ vi inventory [tower] localhost ansible_connection=local [database] [all:vars] admin_password='YOUR_ADMIN_PASSWORD_HERE' pg_host='' pg_port='' pg_database='awx' pg_username='awx' pg_password='YOUR_DB_PASSWORD_HERE' rabbitmq_username=tower rabbitmq_password='YOUR_RABBITMQ_PASSWORD_HERE' rabbitmq_cookie=cookiemonster # Isolated Tower nodes automatically generate an RSA key for authentication; # To disable this behavior, set this value to false # isolated_key_generation=true
06- Run the Ansible Tower setup script as below to start the installation:
$ ./setup.sh
07- Now, open your browser, access the Ansible Tower web interface with your server’s IP or FQDN, the username is admin
and the password that you configured in the inventory file.
08- Finaly, click on browse and provide .pem
license file, agree the End user license Agreemnet and click submit
button.
Otherwise, If you don’t have a license file, you can request for a FREE ANSIBLE TOWER TRIAL LICENSE
Stop / Start Ansible Tower Services
– To stop Ansible Tower Services, just run the below command:
$ sudo ansible-tower-service stop Stopping Tower Redirecting to /bin/systemctl stop postgresql-9.6.service Redirecting to /bin/systemctl stop rabbitmq-server.service Redirecting to /bin/systemctl stop nginx.service Redirecting to /bin/systemctl stop supervisord.service
– To start Ansible Tower Services, use the following command:
$ sudo ansible-tower-service start Starting Tower Redirecting to /bin/systemctl start postgresql-9.6.service Redirecting to /bin/systemctl start rabbitmq-server.service Redirecting to /bin/systemctl start nginx.service Redirecting to /bin/systemctl start supervisord.service
– To check the status of Ansible Tower Services, execute the below command:
$ supervisorctl status exit-event-listener RUNNING pid 6020, uptime 0:26:10 tower-processes:awx-callback-receiver RUNNING pid 6025, uptime 0:26:10 tower-processes:awx-channels-worker RUNNING pid 6023, uptime 0:26:10 tower-processes:awx-daphne RUNNING pid 6024, uptime 0:26:10 tower-processes:awx-dispatcher RUNNING pid 6021, uptime 0:26:10 tower-processes:awx-uwsgi RUNNING pid 6022, uptime 0:26:10
Conclusion
Once everything is installed successfully we are ready to move forward and learn about: