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.aiDependencies are automatically installed:
amazon.awscloud.aws_opsgoogle.cloudcloud.azure_ops
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-1Set Variables
cp sample_vars.yml vars.yml
vi vars.ymlProvision Infrastructure
ansible-playbook infra.ai.aws_provision -i inventory/rhelai.aws_ec2.yml -e @vars.ymlTeardown
ansible-playbook infra.ai.aws_teardown -i inventory/rhelai.aws_ec2.yml -e @vars.ymlDeploying 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.ymlTeardown
ansible-playbook infra.ai.gcp_teardown -e @vars.yml -i inventory/rhelai.gcp.ymlSee also: Getting Started with the redhat.ai Ansible Collection for AI Model Management
Deploying on Azure
Login and Configure
az login
az resource listNote: The azure.azcollection requires additional Python packages:
pip install -r ~/.ansible/collections/ansible_collections/azure/azcollection/requirements.txtProvision
ansible-playbook infra.ai.azure_provision -i localhost, -e @vars.ymlTeardown
ansible-playbook infra.ai.azure_teardown -i localhost, -e @vars.ymlDeploying 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.ymlThe 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.
See also: AAP 2.6 Cloud Automation: AWS, Azure, and GCP with Ansible
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.ymlOr 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-userBest 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
Category: installation