Learn how to install GitLab CE on RHEL 9 or CentOS 9 using Ansible roles. This comprehensive guide covers prerequisites, creating Ansible roles, executing playbooks, and
Learn how to install Ansible Tower on RHEL 9 with this comprehensive step-by-step guide. Covering prerequisites, system requirements, and post-installation tasks, this resource is perfect for IT professionals looking to enhance automation capabilities.
Red Hat Ansible Tower was rebranded as Red Hat Automation Controller in October 2021. This change was part of a broader rebranding of Red Hat’s automation portfolio, aligning it with the Red Hat Ansible Automation Platform. The rebranding aimed to emphasize the comprehensive capabilities of the platform for managing automation across various environments.
Ansible Tower is the enterprise version of Ansible, providing a powerful platform for managing and automating IT tasks in complex environments. With its user-friendly web interface, role-based access control, and scheduling capabilities, Ansible Tower makes it easier to streamline operations. In this guide, we will walk you through the entire process of installing Ansible Tower on RHEL 9, ensuring that you have all the necessary information to get started with automation effectively.
Before you begin the installation process, ensure that you have the following prerequisites:
System Requirements |
It’s essential to meet the following system requirements for a smooth installation of Ansible Tower:
Requirement | Specification |
---|---|
CPU | Minimum 4 cores |
RAM | Minimum 8 GB |
Disk Space | Minimum 20 GB |
Operating System | RHEL 9 or compatible variant |
Python | Python 3.6 or newer |
Ansible | Ansible 2.9 or newer |
Make sure your system meets these requirements before proceeding with the installation.
For this demonstration, we’ve configured our RHEL 9 instance as follows:
Hostname | RAM | Cores | IP Address/OS |
tower.dev.naijalabs.net | 16 | 4 | 192.168.1.10 / Red Hat Enterprise Linux release 9.4 (Plow) |
Installing Required Packages |
To install Ansible Tower, you first need to install some required packages. Open your terminal and execute the following commands:
sudo dnf install -y git wget python3 python3-pip
Photo by admingeek from Infotechys
It’s also advisable to keep your system updated:
sudo dnf update -y && sudo systemctl reboot
Download Ansible Tower |
The next step is to download the Ansible Automation Platform setup bundle. For this demonstration, we’ll go with version 2.4.1. You can obtain the installation package from the official Red Hat Ansible Automation Platform website (You will need to log on with your Red Hat Credentials to complete this step).
Photo by admingeek from Infotechys
Install Ansible Tower |
Now that you have downloaded the installation package, you can extract and run the installer. Follow these steps:
Extract the Installation Package |
tar -xzvf ansible-automation-platform-setup-bundle-2.4-1-x86_64.tar.gz
...omitted for brevity...
ansible-automation-platform-setup-bundle-2.4-1-x86_64/collections/ansible_collections/mdellweg/
ansible-automation-platform-setup-bundle-2.4-1-x86_64/collections/ansible_collections/mdellweg/filters/
ansible-automation-platform-setup-bundle-2.4-1-x86_64/collections/ansible_collections/mdellweg/filters/meta/
ansible-automation-platform-setup-bundle-2.4-1-x86_64/collections/ansible_collections/mdellweg/filters/meta/runtime.yml
ansible-automation-platform-setup-bundle-2.4-1-x86_64/collections/ansible_collections/mdellweg/filters/plugins/
ansible-automation-platform-setup-bundle-2.4-1-x86_64/collections/ansible_collections/mdellweg/filters/plugins/filter/
ansible-automation-platform-setup-bundle-2.4-1-x86_64/collections/ansible_collections/mdellweg/filters/plugins/filter/filters.py
ansible-automation-platform-setup-bundle-2.4-1-x86_64/collections/ansible_collections/mdellweg/filters/plugins/test/
ansible-automation-platform-setup-bundle-2.4-1-x86_64/collections/ansible_collections/mdellweg/filters/plugins/test/tests.py
ansible-automation-platform-setup-bundle-2.4-1-x86_64/collections/ansible_collections/mdellweg/filters/FILES.json
ansible-automation-platform-setup-bundle-2.4-1-x86_64/collections/ansible_collections/mdellweg/filters/LICENSE
ansible-automation-platform-setup-bundle-2.4-1-x86_64/collections/ansible_collections/mdellweg/filters/MANIFEST.json
ansible-automation-platform-setup-bundle-2.4-1-x86_64/collections/ansible_collections/mdellweg/filters/README.md
ansible-automation-platform-setup-bundle-2.4-1-x86_64/group_vars/
ansible-automation-platform-setup-bundle-2.4-1-x86_64/group_vars/all
ansible-automation-platform-setup-bundle-2.4-1-x86_64/inventory
ansible-automation-platform-setup-bundle-2.4-1-x86_64/setup.sh
ansible-automation-platform-setup-bundle-2.4-1-x86_64/README.md
Navigate to the Setup Directory |
cd ansible-automation-platform-setup-bundle-2.4-1-x86_64
Configure the Inventory File |
The inventory
file contains essential configuration settings for your Ansible Tower instance. Open it using your preferred text editor:
vim inventory
Now make the following changes (Under [automationcontroller]
):
[automationcontroller]
tower.dev.naijalabs.net ansible_connection=local
Replace tower.dev.naijalabs.net
with your the actual fully-qualified domain name (FQDN) of your RHEL 9 instance.
tower.dev.naijalabs.net
is the hostname or address of the automation controller.ansible_connection=local
specifies that Ansible should use the local connection type, meaning it will execute tasks on the local machine where the playbook is running, rather than connecting to a remote host.
[all:vars]
admin_password='Enter_Your_Password'
pg_host=''
pg_port=5432
pg_database='awx'
pg_username='awx'
pg_password='Enter_Your_Password'
pg_sslmode='prefer' # set to 'verify-full' for client-side enforced SSL
Under the [all:vars]
section, specify the password for both the admin user and the PostgreSQL database.
[automationcontroller]
tower.dev.naijalabs.net ansible_connection=local
Optional: If you want the Automation Controller to pull images from the Hub Registry your can provide your Red Hat Credentials in the Container Registry Section.
registry_url='registry.redhat.io'
registry_username='Your Red_Hat_Username'
registry_password='Your_Red_Hat_Password'
Provide an admin
password for the Automation Hub Configuration section:
# Automation Hub Configuration
#
automationhub_admin_password='Enter_Your_Password'
automationhub_pg_host=''
automationhub_pg_port=5432
automationhub_pg_database='automationhub'
automationhub_pg_username='automationhub'
automationhub_pg_password=''
automationhub_pg_sslmode='prefer'
Repeat the same step for the Automation EDA Controller Configuration section:
# Automation EDA Controller Configuration
#
automationedacontroller_admin_password='Enter_Your_Password'
automationedacontroller_pg_host=''
automationedacontroller_pg_port=5432
automationedacontroller_pg_database='automationedacontroller'
automationedacontroller_pg_username='automationedacontroller'
automationedacontroller_pg_password=''
There are additional configuration changes that can be made to the inventory file, but for now, we’ll leave it as is. With the changes we’ve already made, you should be able to successfully install a standalone Ansible Tower or Ansible Automation Platform. ***Be sure to replace Enter_Your_Password
with a strong, secure password and store in a safe place or password database***
Update deprecated yaml files |
🛑Important Note: The ansible.builtin.include
module has been removed. Use include_tasks
or import_tasks
instead. Update your playbooks as this feature was removed after May 16, 2023. Open the following files with your preferred text editor and change
to include:include_tasks:
vim collections/ansible_collections/ansible/automation_platform_installer/roles/postgres/tasks/main.yml
vim collections/ansible_collections/ansible/automation_platform_installer/roles/packages_el/tasks/main.yml
vim collections/ansible_collections/ansible/automation_platform_installer/roles/redis/tasks/main.yml
vim collections/ansible_collections/ansible/automation_platform_installer/roles/rsyslog/tasks/main.yml
vim collections/ansible_collections/ansible/automation_platform_installer/roles/supervisor/tasks/main.yml
Run the Installation Script |
With the inventory file configured and the YAML files updated, we’re now ready to execute the installation script:
sudo ./setup.sh
The installation will take several minutes to complete, as over 300 tasks will be executed during this process. Feel free to grab a coffee or stretch your legs while you wait! 😊
Photo by admingeek from Infotechys
Accessing the Ansible Automation Platform (Ansible Tower) |
Upon a successfully run of the installation script, enter the following URL in your preferred browser: (https://<your_server_ip> or <FQDN>
)
Photo by admingeek from Infotechys
Log on with username admin
and the password you provided earlier (Configure the Inventory File Section).
Photo by admingeek from Infotechys
Upon logging in, please follow these steps:
|
After completing these steps, you will be redirected to the Ansible Automation Dashboard.
Photo by admingeek from Infotechys
Congratulations! You’ve successfully installed the Ansible Automation Platform (formerly Ansible Tower). This is just the beginning of what it can do. For more information and guidance on getting started, please consult the official documentation page.
Ansible Tower, now known as Ansible Automation Platform, provides a powerful and scalable solution for automating IT tasks in enterprise environments. By following this guide, you should now have a fully functional installation of Ansible Tower on RHEL 9, ready to streamline and simplify your automation processes. With its user-friendly interface and advanced features, Ansible Tower will improve your workflow, boost efficiency, and make managing your infrastructure easier than ever.
Did you find this article useful? Your feedback is invaluable to us! Please feel free to share your thoughts in the comments section below and share this post!
Learn how to install GitLab CE on RHEL 9 or CentOS 9 using Ansible roles. This comprehensive guide covers prerequisites, creating Ansible roles, executing playbooks, and
Learn how to install Kubernetes using Ansible on Ubuntu 24.04. This comprehensive guide covers prerequisites, setup, and configuration, ensuring a streamlined and consistent deployment process.
Learn how to effortlessly deploy and manage a LAMP stack on RHEL9 using Ansible. Streamline your server setup with automation! Table of Contents Introduction Hey