In this article we will install and configure Ansible Tower on CentOS 7, Red Hat Enterprise Linux (RHEL). Ansible is quickly becoming the standard automation tool used in enterprises for automating everything. It is powerful, simple, easy to learn and these of course are the main reasons it becoming the standard everywhere.
Ansible has two components: Ansible Core and Ansible Tower. Core provides the Ansible runtime that executes playbooks (yaml files defining tasks and roles) against inventories (group of hosts). Ansible Tower provides management, visibility, job scheduling, credentials, RBAC, auditing / compliance and more. In our previous article we discussed Ansible Core installation and configuration. Installing Ansible Tower also installs Ansible core so you kill two birds with one stone.
For more details please visit Ansible official website
Prerequisites
Before starting for Ansible Tower you need rhel-7-server-rpms, rhel-7-server-extras-rpms and EPEL.
1. Install and configure EPEL repositories:
[root@devops]$ yum install http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
[root@devops]$ yum install -y ansible
Install Ansible Tower
Download latest Ansible Tower release.
[root@devops]$ wget http://releases.ansible.com/ansible-tower/setup/ansible-tower-setup-3.1.5.tar.gz [root@devops]$ tar -xzvf ansible-tower-setup-3.1.5.tar.gz
Configure Setup.
Ansible Tower uses an Ansible playbook to deploy itself. As such configuration parameters or groupvars are stored in inventory file.
[root@devops]$ cd ansible-tower-setup-3.1.5/
[root@devops]$ vi inventory [tower] localhost ansible_connection=local [database] [all:vars] admin_password='password' pg_host='' pg_port='' pg_database='awx' pg_username='awx' pg_password='password' rabbitmq_port=5672 rabbitmq_vhost=tower rabbitmq_username=tower rabbitmq_password='password' rabbitmq_cookie=cookiemonster # Needs to be true for fqdns and ip addresses rabbitmq_use_long_name=false
Run Setup.
[root@devops]$ ./setup.sh
Configure Ansible Tower
Ansible Tower Provides a RESTful API, CLI and UI. To connect to the UI simply open browser using http/https and point to your Ansible Tower IP or hostname.
https://<Ansible Tower IP or Hostname>
Login using the user you configured in the inventory file, in this case admin/password.
Once you are logged in, you need to configure license. Tower license comes in a file, so simply browse to the file and accept the terms. If you don’t have a license you can get a trial here.
References:
http://docs.ansible.com/ansible-tower/latest/html/installandreference/index.html
https://keithtenzer.com/2017/07/06/ansible-tower-installation-and-configuration-guide/