Software >> OS >> Unix >> Linux >> RHEL >> 7 >> How to install ansible and ansible tower


## Make sure the machine meets the ansible tower requirements

RHEL 64bit
RAM > 4GB
HDD > 20GB


## download the ansible installer bundle

cd /var/tmp
wget --no-check-certificate https://releases.ansible.com/ansible-tower/setup/ansible-tower-setup-latest.tar.gz


## extract
## depending on the version number, it will create a sub directory with the version number e.g.
## ansible-tower-setup-3.8.4-1

tar cvfz ansible-tower-setup-latest.tar.gz


#
# edit the inventory file to insert passwords
## eg. if the extracted installer is in ansible-tower-setup-3.8.4-1

cd ansible-tower-setup-3.8.4-1
vi inventory


## modify accordingly

[tower]
localhost ansible_connection=local

[automationhub]

[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'
pg_sslmode='prefer'  # set to 'verify-full' for client-side enforced SSL


## if you want to tweak the installation requirements e.g. minimum RAM size, you can edit the variables in

[INSTALLDIR]/roles/preflight/defaults/main.yml



## run the installer and wait till completed.

./setup.sh



##  Check the ansible tower service and enable and start if necessary

## 

systemctl enable ansible-tower

systemctl start ansible-tower


[root@mgmt7 ~]# systemctl status ansible-tower
● ansible-tower.service - Ansible Tower service
   Loaded: loaded (/usr/lib/systemd/system/ansible-tower.service; enabled; vendor preset: disabled)
   Active: active (exited) since Tue 2022-04-26 09:59:05 +08; 36min ago
  Process: 1478 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
 Main PID: 1478 (code=exited, status=0/SUCCESS)
    Tasks: 0
   Memory: 0B
   CGroup: /system.slice/ansible-tower.service

Apr 26 09:59:05 mgmt7 systemd[1]: Starting Ansible Tower service...
Apr 26 09:59:05 mgmt7 systemd[1]: Started Ansible Tower service.