AAP 2.6 ansible-navigator: Modern CLI for Automation Development
By Luca Berton · Published 2024-01-01 · Category: installation
Master ansible-navigator for AAP 2.6 development. Interactive TUI, EE integration, playbook execution, inventory browsing, collection exploration, and developer workflow best practices.
What is ansible-navigator?
ansible-navigator is the modern replacement for ansible-playbook, ansible-doc, ansible-inventory, and ansible-config commands. It provides a text-based user interface (TUI) for interactive exploration and integrates natively with Execution Environments (EEs).
Installation
Configuration
ansible-navigator.yml
Create a project-level configuration:
Configuration Hierarchy Command-line arguments (highest priority) Environment variables (ANSIBLE_NAVIGATOR_*) Project ansible-navigator.yml (in current directory) User ~/.ansible-navigator.yml Defaults
Running Playbooks
Interactive Mode (TUI)
The TUI shows real-time task execution. Navigate with: • Number keys — drill into specific plays/tasks • :back or Esc — go up a level • :stdout — view raw output • :open — open artifact in editor • :quit or q — exit
Stdout Mode (CI/CD)
Exploring Execution Environments
List EE Contents
The TUI shows: • Image name, tag, and size • Installed collections and versions • Python packages • System packages • Ansible version
Inspect EE
Browsing Collections
The TUI lets you: Browse all installed collections Drill into modules, roles, plugins Read full documentation with examples Search across collections
Inventory Management
Navigate the TUI to explore: • Groups and their members • Host variables • Group variables • Dynamic inventory output
Configuration Inspection
Playbook Artifacts
ansible-navigator saves detailed execution artifacts:
Replay Artifacts
This opens the TUI with the saved run, letting you drill into tasks and review results without re-running.
Developer Workflow
Local Development Loop
Working Without EEs
Multiple EE Workflow
CI/CD Integration
GitHub Actions
GitLab CI
Comparison with Legacy Commands
| Legacy Command | Navigator Equivalent | |---------------|---------------------| | ansible-playbook site.yml | ansible-navigator run site.yml | | ansible-doc ansible.builtin.copy | ansible-navigator doc ansible.builtin.copy | | ansible-inventory --list | ansible-navigator inventory --list | | ansible-config dump | ansible-navigator config dump | | ansible-lint | ansible-navigator lint |
Key difference: Navigator runs inside EEs by default, ensuring your development environment matches production AAP.
FAQ
Do I need podman or docker for ansible-navigator?
You need a container runtime (podman or docker) only if using Execution Environments (--ee true, which is the default). Without EEs (--ee false), no container runtime is needed — it uses your local Ansible installation.
Can I use ansible-navigator with AAP?
ansible-navigator is for local development. AAP Controller runs jobs on execution nodes. The benefit: develop locally with the same EE image that AAP uses in production, ensuring consistent behavior.
How do I pass vault passwords?
Use --ask-vault-pass for interactive prompts, --vault-password-file for file-based passwords, or set ANSIBLE_VAULT_PASSWORD_FILE environment variable. These work the same as ansible-playbook.
Why is my playbook slower in navigator?
First run pulls the EE image (can be several GB). Subsequent runs are fast. If consistently slow, the EE might be oversized — build a minimal EE with only required collections.
Can I use custom ansible.cfg with navigator?
Yes. Set ansible.config.path in ansible-navigator.yml or use the ANSIBLE_CONFIG environment variable. The config is mounted into the EE automatically.
Conclusion
ansible-navigator is the standard CLI tool for AAP 2.6 development workflows. Its interactive TUI, EE integration, artifact replay, and collection browser make it far more powerful than the legacy ansible-playbook command. Use it locally to develop and test with the same Execution Environments that run in production AAP.
Related Articles • AAP 2.6 Execution Environments: Build, Manage, and Deploy Custom EEs • AAP 2.6 Private Automation Hub: Collections and EE Images • AAP 2.6 Architecture and Components: Complete Guide • AAP 2.6 Troubleshooting Guide: Common Issues and Solutions • AAP 2.6 Job Templates and Inventories: Complete Configuration Guide
Category: installation