AnsiblePilot — Master Ansible Automation

AnsiblePilot is the leading resource for learning Ansible automation, DevOps, and infrastructure as code. Browse over 1,400 tutorials covering Ansible modules, playbooks, roles, collections, and real-world examples. Whether you are a beginner or an experienced engineer, our step-by-step guides help you automate Linux, Windows, cloud, containers, and network infrastructure.

Popular Topics

About Luca Berton

Luca Berton is an Ansible automation expert, author of 8 Ansible books published by Apress and Leanpub including "Ansible for VMware by Examples" and "Ansible for Kubernetes by Example", and creator of the Ansible Pilot YouTube channel. He shares practical automation knowledge through tutorials, books, and video courses to help IT professionals and DevOps engineers master infrastructure automation.

Deploying RHEL AI Infrastructure with the infra.ai Ansible Collection

By Luca Berton · Published 2024-01-01 · Category: installation

Complete guide to using the infra.ai validated content collection for deploying Red Hat Enterprise Linux AI on AWS, Azure, GCP, and bare metal.

Deploying RHEL AI Infrastructure with the infra.ai Ansible Collection

Introduction

The infra.ai Ansible validated content collection provides ready-to-use roles and playbooks for deploying Red Hat Enterprise Linux AI (RHEL AI) across AWS, Azure, Google Cloud Platform, and bare metal environments. This guide walks through each deployment option.

See also: Red Hat Enterprise Linux 9 for SysAdmins Book by Luca Berton & Jerome Gotangco

What's Included

The collection provides: • 9 Playbooks for provisioning and teardown across platforms • 2 Roles for bare metal ISO creation and NGINX proxy setup • Support for AWS, Azure, GCP, and bare metal deployments

Installation

ansible-galaxy collection install infra.ai

Dependencies are automatically installed: • amazon.awscloud.aws_opsgoogle.cloudcloud.azure_ops

See also: Getting Started with the redhat.ai Ansible Collection for AI Model Management

Deploying on AWS

Configure Credentials

aws configure set aws_access_key_id     my-access-key
aws configure set aws_secret_access_key my-secret-key
aws configure set region                eu-central-1

Set Variables

cp sample_vars.yml vars.yml
vi vars.yml

Provision Infrastructure

ansible-playbook infra.ai.aws_provision -i inventory/rhelai.aws_ec2.yml -e @vars.yml

Teardown

ansible-playbook infra.ai.aws_teardown -i inventory/rhelai.aws_ec2.yml -e @vars.yml

Deploying on Google Cloud

Configure Service Account

gcloud init
gcloud iam service-accounts keys create creds.json --iam-account=<iam_account>

Provision

ansible-playbook infra.ai.gcp_provision -e @vars.yml -i inventory/rhelai.gcp.yml

Teardown

ansible-playbook infra.ai.gcp_teardown -e @vars.yml -i inventory/rhelai.gcp.yml

See also: AAP 2.6 Cloud Automation: AWS, Azure, and GCP with Ansible

Deploying on Azure

Login and Configure

az login
az resource list

Note: The azure.azcollection requires additional Python packages:

pip install -r ~/.ansible/collections/ansible_collections/azure/azcollection/requirements.txt

Provision

ansible-playbook infra.ai.azure_provision -i localhost, -e @vars.yml

Teardown

ansible-playbook infra.ai.azure_teardown -i localhost, -e @vars.yml

Deploying on Bare Metal

Prerequisites

Download the RHEL AI ISO from Red Hat Generate container registry credentials at Red Hat Registry Authentication

Build ISO

ansible-playbook infra.ai.baremetal_provision -e @vars.yml

The playbook creates a customized ISO image. Transfer it to a USB drive and boot the target machine. Warning: The bare metal host will be automatically reinstalled with no human interaction required.

Setting Up NGINX Proxy

Deploy a reverse proxy with SSL for AI services:

ansible-playbook infra.ai.proxy -i inventory/rhelai.aws_ec2.yml -e @vars.yml

Or use the role directly:

---
- name: Install and provision nginx proxy
  hosts: all
  roles:
    - role: infra.ai.nginx_proxy
      nginx_proxy_fqdn: ai.example.com
      nginx_proxy_install_dir: /home/ec2-user

Best Practices

Start with cloud — AWS or GCP is easiest for initial testing Customize vars.yml — The sample file is well-documented Use the proxy role — SSL termination is essential for production Plan bare metal carefully — The ISO will wipe the target machine

Conclusion

The infra.ai collection dramatically simplifies RHEL AI deployment across any environment. Whether you're running AI workloads in the cloud or on-premise, these validated playbooks provide a production-ready starting point.

For more Ansible tutorials and guides, explore the complete article collection on Ansible Pilot.

Related Articles

collection versioning with Ansible Galaxyorganizing hosts with Ansible inventoryIAM management via Ansible on AWSNginx deployment with Ansiblebuilding reusable Ansible roles

Category: installation

Browse all Ansible tutorials · AnsiblePilot Home