Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

Install containerized Ansible Automation Platform on RHEL 9.2

November 30, 2023
Himanshu Yadav
Related topics:
Automation and managementContainersLinux
Related products:
Red Hat Ansible Automation PlatformRed Hat Enterprise Linux

Share:

    Red Hat Ansible Automation Platform is an enterprise automation tool that simplifies IT orchestration, configuration management, and application deployment. With its ability to automate repetitive tasks, Ansible has become a cornerstone of many DevOps workflows.

    In this article, we will explore the process of setting up a containerized Ansible Automation Platform solution on Red Hat Enterprise Linux (RHEL) 9.2, and discuss the benefits of employing such a setup.

    Benefits of containerized Ansible Automation Platform

    Reasons to consider using containerized Ansible Automation Platform include the following:

    • Installation experience: Traditionally, during installation, we had to define all nodes, access, permissions, and many more. However, with this solution, we can do it on a single host.
    • Portability: The capability to package Ansible Automation Platform as a container facilitates seamless deployment across various environments, ensuring consistent behavior and results.
    • Resource efficiency: Optimized resource utilization and quicker deployment of automation tasks by consuming fewer resources than traditional nodes.
    • Simplified management: Containerization simplifies the management and maintenance of Ansible Automation Platform, enabling streamlined updates and version control.

    Prerequisites

    Before you begin, ensure you have the following prerequisites:

    • Red Hat Enterprise Linux 9.2 workstation with administrative privileges.
    • System/server with the following resources:
      • Storage: 30 GB
      • Memory: 16 GB RAM
      • CPU: 4 cores

    Download the containerized bundle

    The Ansible Automation Platform offers comprehensive support for multiple platforms and architectures. For this article, we will specifically download Platform 2.4-x86_64 (Figure 1). To  download the file, visit the Ansible Automation Platform product page. 

    bundel download
    Figure 1: Containerized setup bundle download.

    After downloading, you will receive the .tar.gz compressed file. To extract this file, use the following command:

    $ ls
    ansible-automation-platform-containerized-setup-bundle-2.4-1-x86_64.tar.gz
     
    $ tar xvzf  ansible-automation-platform-containerized-setup-bundle-2.4-1-x86_64.tar.gz

    Set up the dependencies

    Follow the steps below to set up the dependencies.

    1. Check the hostname 

    Check the currently available hostname using the hostname command.

    $ hostname
    localhost.localdomain

    2. Install the ansible-core and dependencies

    We are preparing to deploy all containers of the Ansible Automation Platform using Ansible. Therefore, we require the presence of ansible-core in the system, along with the git, wget, and rsync packages.

    $ sudo dnf install -y ansible-core git wget rsync

    3. Configure the inventory file for Ansible Automation Platform installation

    Upon extracting the bundle, an inventory file is generated under ansible-automation-platform- containerized-setup-bundle-2.4/inventory location, containing parameters such as the hostname, passwords, and credentials for host the container registry. You can refer to the provided file to update your inventory configurations. 

    You need to update the hostname and password of the Ansible controller, automation hub, Event-Driven Ansible, and PostgreSQL database using the following commands:

    $ sed -i 's/fqdn_of_your_rhel_host/localhost.localdomain/g' inventory
    $ sed -i 's/<set your own>/redhat/g' inventory

    An additional feature introduced allows you to define the controller_licence_file in the inventory, which will be fetched during the automation controller installation and define the path of the bundle directory.

    When all updates have been made, your file should look as shown below.

    # This is the AAP installer inventory file
    # Please consult the docs if you're unsure what to add
    # For all optional variables please consult the included README.md
    
    # This section is for your AAP Controller host(s)
    # -------------------------------------------------
    [automationcontroller]
    localhost.localdomain ansible_connection=local
    
    # This section is for your AAP Automation Hub host(s)
    # -----------------------------------------------------
    [automationhub]
    localhost.localdomain ansible_connection=local
    
    # This section is for your AAP EDA Controller host(s)
    # -----------------------------------------------------
    [automationeda]
    localhost.localdomain ansible_connection=local
    
    # This section is for the AAP database(s)
    # -----------------------------------------
    # Uncomment the lines below and amend appropriately if you want AAP to install and manage the postgres databases
    # Leave commented out if you intend to use your own external database and just set appropriate _pg_hosts vars
    # see mandatory sections under each AAP component
    [database]
    localhost.localdomain ansible_connection=local
    
    [all:vars]
    
    # Common variables needed for installation
    # ----------------------------------------
    postgresql_admin_username=postgres
    postgresql_admin_password=redhat
    # If using the online (non-bundled) installer, you need to set RHN registry credentials
    #registry_username=RHN registry username
    #registry_password=RHN registry password
    # If using the bundled installer, you need to alter defaults by using:
    bundle_install=true
    bundle_dir=/home/user/Downloads/ansible-automation-platform-containerized-setup-bundle-2.4-1-x86_64/bundle/
    
    # AAP Controller - mandatory
    # --------------------------
    controller_admin_password=redhat
    controller_pg_host=localhost.localdomain
    controller_pg_password=redhat
    
    # AAP Controller - optional
    # -------------------------
    # To use the postinstall feature you need to set these variables
    #controller_postinstall=true
    #controller_license_file=<full path to your manifest .zip file>
    #controller_postinstall_dir=<full path to your config-as-code directory>
    
    # AAP Automation Hub - mandatory
    # ------------------------------
    hub_admin_password=redhat
    hub_pg_host=localhost.localdomain
    hub_pg_password=redhat
    
    # AAP Automation Hub - optional
    # -----------------------------
    
    # AAP EDA Controller - mandatory
    # ------------------------------
    eda_admin_password=redhat
    eda_pg_host=localhost.localdomain
    eda_pg_password=redhat
    controller_main_url=https://localhost.localdomain
    
    # AAP EDA Controller - optional

    We are installing the Ansible Automation Platform using the bundle method. If you prefer to install it from Red Hat container registries, then define the RHN credentials under [all:vars].

    To access registry.redhat.io (RHN registry), visit the Registry Service Accounts page and create a service account. Then, add the credentials provided above.

    Installation

    The installation of the Ansible Automation Platform is straightforward. With the help of ansible-playbook, we can do the installation. Before that, we need to set the collection path in the system using the following command. The collection directory will be obtained after the bundle is extracted.

    Using the provided example path, please specify your file location accordingly:

    $ export ANSIBLE_COLLECTIONS_PATH=/home/user/ansible-automation-platform-containerized-setup-bundle-2.4-1-x86_64/collections

    To initiate the installation of the containerized Ansible Automation Platform, use the following commands.

    If the system has a set root password, please refer to this command:

    $ ansible-playbook -i inventory ansible.containerized_installer.install  --extra-vars "ansible_sudo_pass=sudo_pass"

    You can also define or pass other options as shown below:

    $ ansible-playbook -i inventory ansible.containerized_installer.install <options>

    After the successful deployment of Ansible Automation Platform, you will get the following logs in your terminal. (Please note this might take some time.)

    TASK [Execute automation controller resource configuration]
    skipping: [localhost.localdomain]
    
    PLAY RECAP
    localhost                  : ok=13   changed=0    unreachable=0    failed=0    skipped=19   rescued=0    ignored=0  
    localhost.localdomain            : ok=248  changed=116  unreachable=0    failed=0    skipped=38   rescued=0    ignored=0 

    To ensure all containers are functioning properly and running healthy, it is necessary to check using the Podman command, as shown below:

    [test@localhost]$ podman ps
    CONTAINER ID  IMAGE                                                                             COMMAND               CREATED            STATUS            PORTS       NAMES
    3b0ba97b6cbc  registry.redhat.io/rhel8/postgresql-13:latest                                     run-postgresql        About an hour ago  Up About an hour              postgresql
    30f5c72d2ef5  registry.redhat.io/rhel8/redis-6:latest                                           run-redis             About an hour ago  Up About an hour              redis
    da5a6736a549  registry.redhat.io/ansible-automation-platform-24/ee-supported-rhel8:latest       /usr/bin/receptor...  About an hour ago  Up About an hour              receptor
    da09cb02cbc2  registry.redhat.io/ansible-automation-platform-24/controller-rhel8:latest         /usr/bin/launch_a...  About an hour ago  Up About an hour              automation-controller-rsyslog
    5e375a3000ba  registry.redhat.io/ansible-automation-platform-24/controller-rhel8:latest         /usr/bin/launch_a...  About an hour ago  Up About an hour              automation-controller-task
    8966d48c8da8  registry.redhat.io/ansible-automation-platform-24/controller-rhel8:latest         /usr/bin/launch_a...  About an hour ago  Up About an hour              automation-controller-web
    fe8181a70e9d  registry.redhat.io/ansible-automation-platform-24/eda-controller-rhel8:latest     gunicorn --bind 1...  About an hour ago  Up About an hour              automation-eda-api
    e68ed6ec96e2  registry.redhat.io/ansible-automation-platform-24/eda-controller-rhel8:latest     daphne -b 127.0.0...  About an hour ago  Up About an hour              automation-eda-daphne
    21bdf58fda44  registry.redhat.io/ansible-automation-platform-24/eda-controller-ui-rhel8:latest  /bin/sh -c nginx ...  About an hour ago  Up About an hour              automation-eda-web
    2e6891d447e6  registry.redhat.io/ansible-automation-platform-24/eda-controller-rhel8:latest     aap-eda-manage rq...  About an hour ago  Up 59 minutes                 automation-eda-worker-1
    e765db6d582b  registry.redhat.io/ansible-automation-platform-24/eda-controller-rhel8:latest     aap-eda-manage rq...  About an hour ago  Up 59 minutes                 automation-eda-worker-2
    40d558b35409  registry.redhat.io/ansible-automation-platform-24/hub-rhel8:latest                pulp-api              58 minutes ago     Up 54 minutes                 automation-hub-api
    2ad8cd0bdb75  registry.redhat.io/ansible-automation-platform-24/hub-rhel8:latest                pulp-content          57 minutes ago     Up 54 minutes                 automation-hub-content
    3a5549071322  registry.redhat.io/ansible-automation-platform-24/hub-web-rhel8:latest            nginx -g daemon o...  57 minutes ago     Up 54 minutes                 automation-hub-web
    533c8d52a5be  registry.redhat.io/ansible-automation-platform-24/hub-rhel8:latest                pulp-worker           57 minutes ago     Up 52 minutes                 automation-hub-worker-1
    58fb57560932  registry.redhat.io/ansible-automation-platform-24/hub-rhel8:latest                pulp-worker           57 minutes ago     Up 52 minutes                 automation-hub-worker-2

    Verify installation of Ansible Automation Platform

    After the installation, it is important to verify the running components within Ansible Automation Platform, such as the automation controller, automation hub, and the recently integrated Event-Driven Ansible dashboard.

    Automation controller

    The Ansible automation controller, shown in Figure 2, facilitates a methodical implementation of automation through the integration of Ansible Automation Platform. By establishing uniform procedures for deploying, initiating, delegating, and auditing automation processes, it empowers enterprises to embrace automation with assurance, simultaneously curtailing excess and discrepancies within their IT landscapes.

    Visit https://your_RHEL_host:443.

    automation controller
    Figure 2: Automation controller dashboard.

    Automation hub

    The Ansible automation hub, shown in Figure 3, serves as a centralized repository for the exploration, acquisition, and administration of Ansible Content Collections. These collections consist of comprehensive sets of modules, plug-ins, roles, and related documentation from Red Hat and affiliated partners. A component of your Red Hat Ansible Automation Platform subscription, the Ansible Content Collections available in the automation hub significantly expedite the automation of new projects for teams.

    Visit https://your_RHEL_host:444.

    Automation Hub
    Figure 3: Automation Hub dashboard.

    Event-Driven Ansible

    Utilizing an event-driven approach, Ansible is capable of handling events that encapsulate detailed insights regarding the prevailing conditions within the IT environment. It efficiently assesses the optimal course of action in response to these events and subsequently orchestrates automated measures to effectively manage or resolve the identified occurrences. The Event-Driven Ansible dashboard is shown in Figure 4.

    Visit https://your_RHEL_host:445.

    EDA
    Figure 4: Event-Driven Ansible dashboard. 

    Continue your automation journey with Ansible Automation Platform

    Get started with Ansible Automation Platform by exploring interactive hands-on labs. Download Ansible Automation Platform at no cost and begin your automation journey. 

    Related Posts

    • What's new in Ansible Automation Platform 2.4

    • How to deploy applications using Ansible Automation Platform

    • Secure RHEL systems using Ansible Automation Platform

    • 5 examples of security automation with Ansible

    • 6 steps to install Ansible Automation Platform 2.3 on RHEL

    • How to create execution environments using ansible-builder

    Recent Posts

    • How to run AI models in cloud development environments

    • How Trilio secures OpenShift virtual machines and containers

    • How to implement observability with Node.js and Llama Stack

    • How to encrypt RHEL images for Azure confidential VMs

    • How to manage RHEL virtual machines with Podman Desktop

    What’s up next?

    Zero Trust and automation Share Image

    Read Build a foundation of security with Zero Trust and automation to find out more about the Zero Trust model, including automating Zero Trust and more with Red Hat Ansible Automation Platform.

    Get the e-book
    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue