AAP 2.6 Upgrade Guide: RHEL 8 to 9 and RPM to Containerized Migration
By Luca Berton · Published 2026-05-19 · Category: installation
Complete guide to AAP 2.6 migration: RHEL 8 to 9, RPM to containerized, database-centric vs clean-rebuild migration approaches with step-by-step procedures.
Upgrading to Ansible Automation Platform 2.6 often involves more than a version bump — it can mean moving from RHEL 8 to RHEL 9 and from an RPM-based installation to a containerized deployment. This guide covers which paths are supported, how to choose between the two migration strategies, and the detailed procedure for each.
Migration Matrix: What You Can Do From Each Starting Point
The matrix below shows every supported path from AAP 2.5 to AAP 2.6. "Upgrade" means an in-place upgrade of the existing system. "Migrate" means backup, fresh install, and restore.
| From | To RPM (RHEL 9) | To Container (RHEL 9) | To Container (RHEL 10) | To OCP Operator |
|---|---|---|---|---|
| AAP 2.5 RPM on RHEL 8 | Migrate | Migrate | Migrate | Migrate |
| AAP 2.5 RPM on RHEL 9 | Upgrade | Migrate | Migrate | Migrate |
| AAP 2.5 Container on RHEL 9 | N/A | Upgrade | Migrate | Migrate |
| AAP 2.5 Container on RHEL 10 | N/A | N/A | Upgrade | Migrate |
| AAP 2.5 OCP Operator | N/A | N/A | N/A | Upgrade |
Migrate = backup the database, install AAP 2.6 fresh on the target system, restore the backup.
If you are on RHEL 8 or changing topology (e.g., RPM to containerized), you always take the Migrate path regardless of source version.
Two Migration Approaches
Database-Centric Migration (Officially Supported)
The database is the source of truth. Everything migrates — job history, users, passwords, credentials, logs, RBAC assignments.
How it works: back up the source with the AAP installer, run a fresh install of the same AAP version on the target, and restore the backup there with the installer.
Pros:
- Fully supported by Red Hat
- Preserves all data including job history and secrets
SECRET_KEYfiles are included in the installer backup and restored with it- RBAC, users, teams, and credentials are intact on day one
- May require intermediate environments for RHEL 8 hosts (the "upgrade dance" to RHEL 9 first)
- Carries over technical debt (orphaned objects, old logs, stale credentials)
- Time-consuming for large databases (tens of GB of job logs)
Clean-Rebuild Migration (Community Best Practice)
Start fresh on AAP 2.6, then replay your configuration from code. Job history is not migrated — only live configuration.
How it works: export current configuration as code using the ansible.platform collection, install AAP 2.6 fresh, re-import configuration, reconfigure credentials from your secrets manager.
Pros:
- Clean slate — no orphaned objects or stale data carried forward
- Forces documentation of all configuration (often a long-overdue cleanup)
- Faster restore times after a fresh install
- Secrets stay in the secrets manager (Vault, CyberArk) — no
SECRET_KEYdependency
- Job history is not preserved
- Requires pre-migration investment in Configuration as Code
- Credentials must be re-entered manually or re-imported from a secrets manager
Pre-Migration Checklist
Run these checks on the source system before starting either approach.
# Check the automation controller version (reports its own 4.x version)
curl -sk https://aap.example.com/api/v2/ping/ | python3 -m json.tool
# Check RHEL version
cat /etc/redhat-release
# Check disk space — need at least 2x DB size free
df -h /var /tmp
# List active job templates (for inventory before clean-rebuild)
awx job_templates list --all -f human
# Check database size
sudo -u postgres psql -c "\l+"Export your current configuration with the ansible.platform collection (useful for both approaches, essential for clean-rebuild):
---
- name: Export AAP configuration as code
hosts: localhost
connection: local
vars:
controller_hostname: "https://aap.example.com"
controller_username: "admin"
controller_password: "{{ vault_admin_password }}"
controller_validate_certs: true
tasks:
- name: Export all objects
ansible.builtin.include_role:
name: infra.controller_configuration.export
vars:
controller_export_all: true
controller_export_dir: "./aap-config-backup/"See also: How to Upgrade from AAP 2.4 to AAP 2.6 — Step-by-Step Guide
Database-Centric Migration Procedure
Step 1 — Backup the Source Database
Use the installer's backup, not a hand-made database dump. Run it from the setup directory of the currently installed version (use the latest installer of that release):
# On the source, from the existing RPM installer directory
./setup.sh -e 'backup_dest=/backup/' -b
# Verify the archive was created
ls -lh /backup/automation-platform-backup-*.tar.gzThe installer backup captures each component's database, SECRET_KEY file, and the other keys and configuration files the restore needs. Keep a dated copy of your installer inventory file alongside it. For an RPM 2.6 to containerized 2.6 migration, Red Hat's supported flow uses the ansible.aap_snapshot collection to export and import a migration artifact — follow the Ansible Automation Platform migration guide for that path.
Step 2 — Prepare the Target System
For RHEL 8 → RHEL 9 migrations, provision a new RHEL 9 host. Do not in-place upgrade RHEL 8 to 9 while AAP is installed — the Red Hat-supported path uses a fresh RHEL 9 host.
# On the new RHEL 9 target — register with Red Hat
sudo subscription-manager register --auto-attach
# Enable AAP 2.6 repositories
sudo subscription-manager repos \
--enable ansible-automation-platform-2.6-for-rhel-9-x86_64-rpms
# For containerized AAP — install the setup bundle prerequisites
sudo dnf install -y podman python3-pipStep 3 — Install AAP 2.6 Fresh
# Download the AAP 2.6 setup bundle
# (obtain URL from Red Hat Customer Portal)
tar xvf ansible-automation-platform-setup-bundle-2.6*.tar.gz
cd ansible-automation-platform-setup-bundle-2.6*/
# Configure inventory — point to the new host
# Key setting: use_internal_db=false if restoring external DB
cp inventory inventory.bak
vi inventory
# Run the installer (first pass — creates empty DB)
sudo ./setup.shStep 4 — Restore the Database
# Copy the backup archive to the target, then restore it with the installer
./setup.sh -e 'restore_backup_file=/backup/automation-platform-backup-<date>.tar.gz' -rThe restore puts back the databases and the SECRET_KEY files from the backup, so credentials decrypt on the new host. Backup and restore must use the same AAP version: if you need to change versions, restore first and then upgrade.
Step 5 — Verify the Migration
---
- name: Verify AAP 2.6 migration
hosts: localhost
connection: local
tasks:
- name: Check controller version
ansible.builtin.uri:
url: "https://aap-new.example.com/api/v2/ping/"
user: "{{ vault_aap_admin }}"
password: "{{ vault_aap_password }}"
force_basic_auth: true
validate_certs: true
register: ping_result
# The controller reports its own component version (4.x), not the
# AAP release number, so compare it with the AAP 2.6 release notes
- name: Show controller version
ansible.builtin.debug:
msg: "Automation controller version: {{ ping_result.json.version }}"
- name: Verify credential count matches source
ansible.builtin.uri:
url: "https://aap-new.example.com/api/v2/credentials/?page_size=1"
user: "{{ vault_aap_admin }}"
password: "{{ vault_aap_password }}"
force_basic_auth: true
register: cred_count
- name: Display credential count
ansible.builtin.debug:
msg: "Credentials migrated: {{ cred_count.json.count }}"Clean-Rebuild Migration Procedure
Step 1 — Export Configuration from Source
---
- name: Export AAP configuration for clean-rebuild
hosts: localhost
vars:
controller_hostname: "https://aap-old.example.com"
controller_username: "admin"
controller_password: "{{ vault_admin_password }}"
tasks:
- name: Export organizations
ansible.builtin.include_role:
name: infra.controller_configuration.export
vars:
controller_export_all: true
controller_export_dir: "./aap-cac-export/"
- name: List exported files
ansible.builtin.find:
paths: "./aap-cac-export/"
patterns: "*.yaml"
register: exported
- name: Show export summary
ansible.builtin.debug:
msg: "Exported {{ exported.matched }} configuration files"Step 2 — Install AAP 2.6 Fresh
Follow the same install steps as the database-centric procedure (Steps 2–3 above), but do NOT restore the database. Let the installer create a clean empty database.
Step 3 — Re-import Configuration
---
- name: Import AAP configuration to AAP 2.6
hosts: localhost
vars:
controller_hostname: "https://aap-new.example.com"
controller_username: "admin"
controller_password: "{{ vault_admin_password }}"
tasks:
- name: Import organizations
ansible.builtin.include_role:
name: infra.controller_configuration.dispatch
vars:
controller_configuration_dir: "./aap-cac-export/"Step 4 — Re-import Credentials from Vault
---
- name: Import credentials from HashiCorp Vault
hosts: localhost
tasks:
- name: Read credentials from Vault
community.hashi_vault.vault_kv2_get:
path: "secret/data/aap/credentials"
url: "{{ vault_url }}"
token: "{{ vault_token }}"
register: vault_creds
- name: Create machine credentials in AAP
ansible.controller.credential:
name: "{{ item.name }}"
credential_type: Machine
organization: "{{ item.organization }}"
inputs:
username: "{{ item.username }}"
password: "{{ item.password }}"
controller_host: "https://aap-new.example.com"
controller_username: admin
controller_password: "{{ vault_admin_password }}"
loop: "{{ vault_creds.data.data.machine_creds }}"
no_log: trueSee also: Ansible Automation Platform (AAP) Guides: Install, Upgrade, EDA and Operations
FAQ
Can I in-place upgrade RHEL 8 to RHEL 9 while AAP is installed?
No. Red Hat does not support in-place RHEL 8 to 9 upgrades with AAP installed. Provision a new RHEL 9 host and migrate AAP to it.
My database is 50 GB of job logs. Is there a way to slim it down before migrating?
Yes. Purge old job events in the controller before taking the backup: Settings → Jobs → Days before stale job deletion. Set to 30 days and run a cleanup before the migration window to reduce dump size significantly.
Do I need to migrate to RHEL 9 before upgrading to AAP 2.6 RPM?
Yes. AAP 2.6 RPM requires RHEL 9. If you are on AAP 2.5 RPM on RHEL 8, you must move to a RHEL 9 host first (Migrate row in the matrix above).
Does a containerized AAP 2.6 install still need a separate PostgreSQL host?
Containerized AAP 2.6 can run PostgreSQL as a container alongside the application containers, or connect to an external managed database. For production, an external PostgreSQL 15 instance (on RHEL 9 or managed DB) is recommended.
How long does the database restore take?
Restore time scales roughly linearly with database size. A 10 GB dump typically takes 20–40 minutes. A 50 GB dump can take several hours. Plan your maintenance window accordingly and test the restore procedure in a staging environment first.
Can I do a blue-green migration — keep the old system running until cutover?
Yes, and this is the recommended approach when possible. The old AAP 2.5 instance stays online (read-only jobs only) while you validate the new AAP 2.6 instance. After validation, update DNS to point to the new host and decommission the old one.
Related Articles
Category: installation
Upgrading to AAP 2.6, or moving off AWX or Tower?
A written review of your current setup and a 90-minute call, delivered within two weeks. Covers AAP 2.4/2.5 to 2.6, RHEL 8 to 9, RPM to containerized, and AWX or Tower to AAP, with the runbook and rollback plan.
Fixed fee €2,900 · by Open Empower, on openempower.com.
Book the AAP Upgrade Review
Go deeper · Ebook by Luca Berton
Ansible Automation Platform By Example: get the ebook on Leanpub (opens in a new tab)
A step-by-step guide to the most common Ansible Automation Platform scenarios.
- Ebook
- Leanpub
- PDF & EPUB