Standardized Environment Variables in AAP 2.6 — Migration Guide
By Luca Berton · Published 2024-01-01 · Category: troubleshooting
AAP 2.6 standardizes environment variables from component-specific names to unified AAP_ prefix. Learn what changed and how to update your configurations.

Introduction
AAP 2.6 introduces a significant quality-of-life improvement: standardized environment variable naming across all platform components. Collections now use a unified AAP_ prefix instead of component-specific prefixes.
See also: AAP 2.6 RPM Deprecation — Planning Your Containerized Migration
What Changed
Before AAP 2.6
Each component had its own variable naming convention:
# Automation Controller
CONTROLLER_HOST=controller.example.com
CONTROLLER_USERNAME=admin
CONTROLLER_PASSWORD=secret
CONTROLLER_VERIFY_SSL=true
# Automation Hub
AH_HOST=hub.example.com
AH_USERNAME=admin
AH_TOKEN=my-token
# Event-Driven Ansible
EDA_HOST=eda.example.com
EDA_USERNAME=admin
After AAP 2.6
A single, unified naming convention:
# All components use AAP_ prefix
AAP_HOST=gateway.example.com
AAP_USERNAME=admin
AAP_PASSWORD=secret
AAP_VERIFY_SSL=true
Module Variable Changes
Collections also standardize module-level variables:
# Before (component-specific)
- name: Create job template
ansible.controller.job_template:
controller_host: "{{ controller_host }}"
controller_username: "{{ controller_user }}"
name: "Deploy App"
# After (unified)
- name: Create job template
ansible.platform.job_template:
aap_host: "{{ aap_host }}"
aap_username: "{{ aap_user }}"
name: "Deploy App"
See also: How to Upgrade from AAP 2.4 to AAP 2.6 — Step-by-Step Guide
Migration Steps
Step 1: Identify Current Variables
Search your playbooks and environment for component-specific variables:
grep -r "CONTROLLER_\|AH_\|EDA_" /path/to/playbooks/
grep -r "controller_host\|ah_host\|eda_host" /path/to/playbooks/
Step 2: Update Environment Variables
Update your CI/CD pipelines, environment files, and vault entries:
# Update .env files
sed -i 's/CONTROLLER_HOST/AAP_HOST/g' .env
sed -i 's/CONTROLLER_USERNAME/AAP_USERNAME/g' .env
sed -i 's/CONTROLLER_PASSWORD/AAP_PASSWORD/g' .env
Step 3: Update Playbooks
Replace component-specific module calls with the ansible.platform collection.
Step 4: Test
Verify all automation works with the new variable names before deploying to production.
Backward Compatibility
The old variable names may still work in AAP 2.6 for backward compatibility, but they are deprecated and will be removed in a future release. Migrate now to avoid issues later.
See also: AI-Assisted Inventory Generation in AAP 2.6 — Developer Preview
Conclusion
Standardized environment variables simplify configuration management and reduce confusion when working across platform components. Update your configurations now to benefit from the unified naming convention.
For more Ansible tutorials and guides, explore the complete article collection on Ansible Pilot.
Related Articles
• Ansible Vault best practices • Jinja2 templating in Ansible • setting environment variables in AnsibleCategory: troubleshooting