Red Hat Ansible Automation Platform is a comprehensive solution that helps you automate collaboratively. In this article, you will learn how to install Ansible Automation Platform 2.2 on Red Hat Enterprise Linux 9.
Get the Ansible Automation Platform software
Download Ansible Automation Platform 2.2 for RHEL using this link and extract it. Upon extraction, you will see the following files:
[user@user ~ ]$ ls
bundle collections fake-inv group_vars images inventory licenses README.md setup.log setup.sh
Configure the Ansible inventory file
The Ansible inventory file contains details about the database, credentials for PostgreSQL and Ansible, etc. For our example, we will create a single node inventory file for the Ansible Automation Platform.
[automationcontroller]
fqdn ansible_connection=local
[database]
[all:vars]
admin_password='redhat'
pg_host=''
pg_port=''
pg_database='awx'
pg_username='awx'
pg_password='redhat'
This is a sample file; please update the parameters to match your environment.
Ansible Automation Platform installation
To install Ansible Automation Platform on RHEL, execute the file setup.sh
in the terminal in the same directory where you have extracted the setup files.
sudo ./setup.sh
Using /etc/ansible/ansible.cfg as config file
[WARNING]: running playbook inside collection
ansible.automation_platform_installer
[DEPRECATION WARNING]: "include" is deprecated, use include_tasks/import_tasks
instead. This feature will be removed in version 2.16. Deprecation warnings can
be disabled by setting deprecation_warnings=False in ansible.cfg.
PLAY [Warn if no core component is enabled] ************************************
TASK [Warn if no core component is enabled] ************************************
skipping: [localhost] => {"changed": false, "skip_reason": "Conditional result was False"}
[WARNING]: Could not match supplied host pattern, ignoring: tower
[WARNING]: Could not match supplied host pattern, ignoring: automationhub
[WARNING]: Could not match supplied host pattern, ignoring: automationcatalog
[WARNING]: Could not match supplied host pattern, ignoring: execution_nodes
[WARNING]: Could not match supplied host pattern, ignoring: sso
PLAY [Group all valid hosts for AAP installation] ******************************
TASK [Gathering Facts] *********************************************************
ok: [pqdn]
TASK [group hosts used in AAP installer] ***************************************
ok: [pqdn] => {"add_group": "aap_valid_hosts", "changed": false, "parent_groups": ["all"]}
PLAY [aap_valid_hosts] *********************************************************
TASK [ansible.automation_platform_installer.check_config_static : Ensure SSO node is run on a RHEL 8 node] ***
skipping: [pqdn] => {"changed": false, "skip_reason": "Conditional result was False"}
TASK [ansible.automation_platform_installer.check_config_static : Ensure expected variables are defined] ***
skipping: [pqdn] => (item=tower_package_name) => {"ansible_loop_var": "item", "changed": false, "item": "tower_package_name", "skip_reason": "Conditional result was False"}
skipping: [pqdn] => (item=tower_package_version) => {"ansible_loop_var": "item", "changed": false, "item": "tower_package_version", "skip_reason": "Conditional result was False"}
TASK [ansible.automation_platform_installer.check_config_static : Ensure cluster hosts are not localhost] ***
skipping: [pqdn] => {"changed": false, "skip_reason": "Conditional result was False"}
TASK [ansible.automation_platform_installer.check_config_static : Check that group names do not conflict with instance names] ***
skipping: [pqdn] => {"changed": false, "skip_reason": "Conditional result was False"}
TASK [ansible.automation_platform_installer.check_config_static : Detect pre-2.x inventory and offer a migration] ***
ok: [pqdn -> localhost] => {"changed": false, "msg": "Old style inventory not detected, continuing with install"}
TASK [ansible.automation_platform_installer.check_config_static : Detect unsupported HA inventory file] ***
skipping: [pqdn] => {"changed": false, "skip_reason": "Conditional result was False"}
TASK [ansible.automation_platform_installer.check_config_static : Check that no instance groups are named automationcontroller] ***
skipping: [pqdn] => (item=all) => {"ansible_loop_var": "item", "changed": false, "item": "all", "skip_reason": "Conditional result was False"}
skipping: [pqdn] => (item=ungrouped) => {"ansible_loop_var": "item", "changed": false, "item": "ungrouped", "skip_reason": "Conditional result was False"}
skipping: [pqdn] => (item=automationcontroller) => {"ansible_loop_var": "item", "changed": false, "item": "automationcontroller", "skip_reason": "Conditional result was False"}
skipping: [pqdn] => (item=database) => {"ansible_loop_var": "item", "changed": false, "item": "database", "skip_reason": "Conditional result was False"}
skipping: [pqdn] => (item=aap_valid_hosts) => {"ansible_loop_var": "item", "changed": false, "item": "aap_valid_hosts", "skip_reason": "Conditional result was False"}
TASK [ansible.automation_platform_installer.check_config_static : Ensure only one database host exists] ***
skipping: [pqdn] => {"changed": false, "skip_reason": "Conditional result was False"}
Accessing the Ansible Automation Platform Console
After successful installation, you can access the console of the Ansible Automation platform by visiting the console URL http://localhost
(Figure 1). The username is admin
and the password is what you have defined in the inventory file in the [all:vars]
field.
Subscriptions
You must have valid subscriptions attached before using the Red Hat Ansible Automation Platform (Figure 2). Attaching an Ansible Automation Platform subscription enables automation hub repositories.
To log in, use the same credentials you used to download Ansible Automation Platform 2.2. You can import a subscription. You can also obtain the pool_id
for your Red Hat Ansible Automation Platform subscription with this command:
$ subscription-manager list --available --all | grep "Ansible Automation Platform" -B 3 -A 6
That command will return the following, which verifies Ansible Automation Platform entitlements:
Subscription Name: Red Hat Ansible Automation, Premium (5000 Managed Nodes)
Provides: Red Hat Ansible Engine
Red Hat Ansible Automation Platform
SKU: MCT3695
Contract: ````
Pool ID: ``````````
Provides Management: No
Available: 4999
To attach the subscription, use the attach
option with the subscription-manager
command.
# subscription-manager attach --pool=<pool_id>
Once you've subscribed, the Red Hat Ansible Automation Platform will be attached to all nodes and able to access Automation Hub Repositories. To verify that the subscription was successfully attached, run the list option:
# subscription-manager list --consumed
Figure 3 gives you a glimpse of the Ansible Automation Platform web console.
Continue your automation journey with Ansible Automation Platform
You can get started with the Ansible Automation Platform by exploring interactive labs at Red Had Developer. Ansible Automation Platform is also available as a managed offering on Microsoft Azure and as a self-managed offering on Amazon Web Services.
Last updated: September 27, 2024