Ansible Tower Install and Configure

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

Introduction

Automation needs a boost of work in a limited time. Obtain the most of your investment with an enterprise automation platform that delivers agility and flexibility. No matter where you are on your automation journey with ansible tower.

Ansible Tower (previously ‘AWX’) is a web-based that makes Ansible easy to use. It will be the center for all of your automation tasks. The tower is free for usage for up to 10 nodes and comes bundled with fantastic support from Ansible.

It can be installed in many ways. OpenShift based deployments are limited to the only Tower. Deployment from Automation Hub on OpenShift is not possible. Deployed on Automation Hub. You can check more detail, refer to OpenShift Deployment and Configuration.

Ansible Tower is an excellent tool that does what the CLI tasks. It will complement but not replace, the tasks of automating the main tasks graphically, especially the monitoring dashboard tasks. It also greatly reduces the intimidation factor for those new to Ansible by introducing a much easier-to-understand visual tool. But for playbook creation, Ansible’s CLI is still your best option.

  • Supported Operating Systems:
    • Red Hat Enterprise Linux 8.2 or later 64-bit (x86)
    • Red Hat Enterprise Linux 7.7 or later 64-bit (x86)
    • CentOS 7.7 or later 64-bit (x86)
    • CentOS 8.2 or later 64-bit (x86)

Installing repository required

Install Epel repository

[root@tower ~]# dnf install epel-release -y
Last metadata expiration check: 0:08:57 ago on Sun 08 Aug 2021 02:24:01 AM EDT.
Dependencies resolved.
================================================================================================================================================================================================
 Package                                           Architecture                                Version                                        Repository                                   Size
================================================================================================================================================================================================
Installing:
 epel-release                                      noarch                                      8-11.el8                                       extras                                       24 k

Transaction Summary
================================================================================================================================================================================================
Install  1 Package

Total download size: 24 k
Installed size: 35 k
Downloading Packages:
epel-release-8-11.el8.noarch.rpm                                                                                                                                200 kB/s |  24 kB     00:00
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                            22 kB/s |  24 kB     00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                        1/1
  Installing       : epel-release-8-11.el8.noarch                                                                                                                                           1/1
  Running scriptlet: epel-release-8-11.el8.noarch                                                                                                                                           1/1
  Verifying        : epel-release-8-11.el8.noarch                                                                                                                                           1/1

Installed:
  epel-release-8-11.el8.noarch

Complete!
[root@tower ~]#

Install commands required for Tower Installation

[root@tower ~]# dnf -y install ansible vim curl
Extra Packages for Enterprise Linux Modular 8 - x86_64                                                                                                          565 kB/s | 927 kB     00:01
Extra Packages for Enterprise Linux 8 - x86_64                                                                                                                  283 kB/s |  10 MB     00:36
Last metadata expiration check: 0:00:01 ago on Sun 08 Aug 2021 02:37:19 AM EDT.
Package vim-enhanced-2:8.0.1763-15.el8.x86_64 is already installed.
Package curl-7.61.1-18.el8.x86_64 is already installed.
Dependencies resolved.
================================================================================================================================================================================================
 Package                                               Architecture                            Version                                         Repository                                  Size
================================================================================================================================================================================================
Installing:
 ansible                                               noarch                                  2.9.23-1.el8                                    epel                                        17 M
Installing dependencies:
 libsodium                                             x86_64                                  1.0.18-2.el8                                    epel                                       162 k
 python3-babel                                         noarch                                  2.5.1-5.el8                                     appstream                                  4.8 M
 python3-bcrypt                                        x86_64                                  3.1.6-2.el8.1                                   epel                                        44 k
 python3-cffi                                          x86_64                                  1.11.5-5.el8                                    baseos                                     237 k
 python3-cryptography                                  x86_64                                  3.2.1-4.el8                                     baseos                                     559 k
 python3-jinja2                                        noarch                                  2.10.1-2.el8_0                                  appstream                                  538 k
 python3-jmespath                                      noarch                                  0.9.0-11.el8                                    appstream                                   45 k
 python3-markupsafe                                    x86_64                                  0.23-19.el8                                     appstream                                   39 k
 python3-pyasn1                                        noarch                                  0.3.7-6.el8                                     appstream                                  126 k
 python3-pycparser                                     noarch                                  2.14-14.el8                                     baseos                                     109 k
 python3-pynacl                                        x86_64                                  1.3.0-5.el8                                     epel                                       100 k
 python3-pytz                                          noarch                                  2017.2-9.el8                                    appstream                                   54 k
 sshpass                                               x86_64                                  1.06-9.el8                                      epel                                        27 k
Installing weak dependencies:
 python3-paramiko                                      noarch                                  2.4.3-1.el8                                     epel                                       289 k

Transaction Summary
================================================================================================================================================================================================
Install  15 Packages

Total download size: 24 M
Installed size: 126 M
Downloading Packages:
(1/15): python3-jmespath-0.9.0-11.el8.noarch.rpm                                                                                                                200 kB/s |  45 kB     00:00
(2/15): python3-markupsafe-0.23-19.el8.x86_64.rpm                                                                                                               846 kB/s |  39 kB     00:00
(3/15): python3-pyasn1-0.3.7-6.el8.noarch.rpm                                                                                                                   1.4 MB/s | 126 kB     00:00
(4/15): python3-pytz-2017.2-9.el8.noarch.rpm                                                                                                                    1.2 MB/s |  54 kB     00:00
(5/15): python3-jinja2-2.10.1-2.el8_0.noarch.rpm                                                                                                                1.2 MB/s | 538 kB     00:00
(6/15): python3-cffi-1.11.5-5.el8.x86_64.rpm                                                                                                                    1.5 MB/s | 237 kB     00:00
(7/15): python3-pycparser-2.14-14.el8.noarch.rpm                                                                                                                1.2 MB/s | 109 kB     00:00
(8/15): python3-cryptography-3.2.1-4.el8.x86_64.rpm                                                                                                             2.3 MB/s | 559 kB     00:00
(9/15): libsodium-1.0.18-2.el8.x86_64.rpm                                                                                                                       169 kB/s | 162 kB     00:00
(10/15): python3-bcrypt-3.1.6-2.el8.1.x86_64.rpm                                                                                                                357 kB/s |  44 kB     00:00
(11/15): python3-babel-2.5.1-5.el8.noarch.rpm                                                                                                                   2.4 MB/s | 4.8 MB     00:01
(12/15): python3-paramiko-2.4.3-1.el8.noarch.rpm                                                                                                                480 kB/s | 289 kB     00:00
(13/15): sshpass-1.06-9.el8.x86_64.rpm                                                                                                                          225 kB/s |  27 kB     00:00
(14/15): python3-pynacl-1.3.0-5.el8.x86_64.rpm                                                                                                                   99 kB/s | 100 kB     00:01
(15/15): ansible-2.9.23-1.el8.noarch.rpm                                                                                                                         77 kB/s |  17 MB     03:44
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                           108 kB/s |  24 MB     03:46
warning: /var/cache/dnf/epel-6519ee669354a484/packages/ansible-2.9.23-1.el8.noarch.rpm: Header V4 RSA/SHA256 Signature, key ID 2f86d6a1: NOKEY
Extra Packages for Enterprise Linux 8 - x86_64                                                                                                                  1.6 MB/s | 1.6 kB     00:00
Importing GPG key 0x2F86D6A1:
 Userid     : "Fedora EPEL (8) <[email protected]>"
 Fingerprint: 94E2 79EB 8D8F 25B2 1810 ADF1 21EA 45AB 2F86 D6A1
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                        1/1
  Installing       : sshpass-1.06-9.el8.x86_64                                                                                                                                             1/15
  Installing       : libsodium-1.0.18-2.el8.x86_64                                                                                                                                         2/15
  Installing       : python3-pycparser-2.14-14.el8.noarch                                                                                                                                  3/15
  Installing       : python3-cffi-1.11.5-5.el8.x86_64                                                                                                                                      4/15
  Installing       : python3-cryptography-3.2.1-4.el8.x86_64                                                                                                                               5/15
  Installing       : python3-bcrypt-3.1.6-2.el8.1.x86_64                                                                                                                                   6/15
  Installing       : python3-pynacl-1.3.0-5.el8.x86_64                                                                                                                                     7/15
  Installing       : python3-pytz-2017.2-9.el8.noarch                                                                                                                                      8/15
  Installing       : python3-babel-2.5.1-5.el8.noarch                                                                                                                                      9/15
  Installing       : python3-pyasn1-0.3.7-6.el8.noarch                                                                                                                                    10/15
  Installing       : python3-paramiko-2.4.3-1.el8.noarch                                                                                                                                  11/15
  Installing       : python3-markupsafe-0.23-19.el8.x86_64                                                                                                                                12/15
  Installing       : python3-jinja2-2.10.1-2.el8_0.noarch                                                                                                                                 13/15
  Installing       : python3-jmespath-0.9.0-11.el8.noarch                                                                                                                                 14/15
  Installing       : ansible-2.9.23-1.el8.noarch                                                                                                                                          15/15
  Running scriptlet: ansible-2.9.23-1.el8.noarch                                                                                                                                          15/15
  Verifying        : python3-babel-2.5.1-5.el8.noarch                                                                                                                                      1/15
  Verifying        : python3-jinja2-2.10.1-2.el8_0.noarch                                                                                                                                  2/15
  Verifying        : python3-jmespath-0.9.0-11.el8.noarch                                                                                                                                  3/15
  Verifying        : python3-markupsafe-0.23-19.el8.x86_64                                                                                                                                 4/15
  Verifying        : python3-pyasn1-0.3.7-6.el8.noarch                                                                                                                                     5/15
  Verifying        : python3-pytz-2017.2-9.el8.noarch                                                                                                                                      6/15
  Verifying        : python3-cffi-1.11.5-5.el8.x86_64                                                                                                                                      7/15
  Verifying        : python3-cryptography-3.2.1-4.el8.x86_64                                                                                                                               8/15
  Verifying        : python3-pycparser-2.14-14.el8.noarch                                                                                                                                  9/15
  Verifying        : ansible-2.9.23-1.el8.noarch                                                                                                                                          10/15
  Verifying        : libsodium-1.0.18-2.el8.x86_64                                                                                                                                        11/15
  Verifying        : python3-bcrypt-3.1.6-2.el8.1.x86_64                                                                                                                                  12/15
  Verifying        : python3-paramiko-2.4.3-1.el8.noarch                                                                                                                                  13/15
  Verifying        : python3-pynacl-1.3.0-5.el8.x86_64                                                                                                                                    14/15
  Verifying        : sshpass-1.06-9.el8.x86_64                                                                                                                                            15/15

Installed:
  ansible-2.9.23-1.el8.noarch             libsodium-1.0.18-2.el8.x86_64        python3-babel-2.5.1-5.el8.noarch     python3-bcrypt-3.1.6-2.el8.1.x86_64   python3-cffi-1.11.5-5.el8.x86_64
  python3-cryptography-3.2.1-4.el8.x86_64 python3-jinja2-2.10.1-2.el8_0.noarch python3-jmespath-0.9.0-11.el8.noarch python3-markupsafe-0.23-19.el8.x86_64 python3-paramiko-2.4.3-1.el8.noarch
  python3-pyasn1-0.3.7-6.el8.noarch       python3-pycparser-2.14-14.el8.noarch python3-pynacl-1.3.0-5.el8.x86_64    python3-pytz-2017.2-9.el8.noarch      sshpass-1.06-9.el8.x86_64

Complete!
[root@tower ~]#

Download latest Ansible tower package

Command to be executed will download the latest tower setup packages.

# curl -k -O https://releases.ansible.com/ansible-tower/setup/ansible-tower-setup-latest.tar.gz

Extract ansible Ansible tower installer

After downloading packages needs to be extracted to inflate the required binaries.

# tar zxvf ansible-tower-setup-latest.tar.gz
ansible-tower-setup-3.8.3-2/
ansible-tower-setup-3.8.3-2/collections/
ansible-tower-setup-3.8.3-2/collections/ansible_collections/
ansible-tower-setup-3.8.3-2/collections/ansible_collections/ansible/
ansible-tower-setup-3.8.3-2/collections/ansible_collections/ansible/galaxy_collection/
ansible-tower-setup-3.8.3-2/collections/ansible_collections/ansible/galaxy_collection/roles/
......

Change directory to the installation dir.

# cd ansible-tower-setup-3.8.3-2/
ansible-tower-setup-3.8.3-2]#

Change value of below variables from inventory file

[tower]
localhost ansible_connection=local

[automationhub]

[database]

[all:vars]
admin_password='redhat'

pg_host=''
pg_port=''

pg_database='awx'
pg_username='awx'
pg_password='redhat'
pg_sslmode='prefer'  # set to 'verify-full' for client-side enforced SSL

# Automation Hub Configuration
#

automationhub_admin_password='redhat'

automationhub_pg_host=''
automationhub_pg_port=''

automationhub_pg_database='automationhub'
automationhub_pg_username='automationhub'
automationhub_pg_password='redhat'
automationhub_pg_sslmode='prefer'

# By default if the automation hub package and its dependencies
# are installed they won't get upgraded when running the installer
# even if newer packages are available. One needs to run the ./setup.sh
# script with the following set to True.

Generate a ssh key

Ssh key is required to install the packages and requirements

[root@tower ansible-tower-setup-3.8.3-2]# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:icw2+OCID7Nh81Ow54YvK1VuvWaWt5NSlvuVHTtUoT0 [email protected]
The key's randomart image is:
+---[RSA 3072]----+
|               . |
|              o .|
|             . E.|
|   . = . .      o|
|    B B S .    o |
| . = O o +    + o|
|=oo B . = o  o + |
|.Bo+ o B =  .   .|
|. oo*.+ o.+.     |
+----[SHA256]-----+
[root@tower ansible-tower-setup-3.8.3-2]#

Start installation

Execute the script from the installation directory

# ./setup.sh

Now access the tower from browser

If you need to learn an ansible engine for doing the tasks with ad-hoc and playbook. link

Attaching 60 days subscription

Getting a 60-day trial subscription link

Ansible Tower Dashboard

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"
Mel
Melhttps://unixcop.com
Unix/Linux Guru and FOSS supporter

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook