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.

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.aws
• cloud.aws_ops
• google.cloud
• cloud.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 AuthenticationBuild 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 machineConclusion
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 Galaxy • organizing hosts with Ansible inventory • IAM management via Ansible on AWS • Nginx deployment with Ansible • building reusable Ansible rolesCategory: installation