What Is Ansible Navigator and How Do You Install It on RHEL 9?
Ansible Navigator is a graphical user interface (GUI) tool for Ansible automation that allows users to manage and configure their Ansible environments using a visual interface. It provides a simplified view of Ansible's automation capabilities, allowing users to quickly and easily create, edit, and run Ansible playbooks, inventories, and variables.
Quick answer: Ansible Navigator is a text-based terminal tool for running and inspecting Ansible content, usually inside containers called execution environments. It has no web interface. On RHEL 9, install it with sudo dnf install ansible-navigator after enabling the Ansible Automation Platform repository, or install it with pip in a virtual environment. It also needs Podman for execution environments.
Key takeaways
- Ansible Navigator is not in EPEL and it is not a web GUI. It runs in your terminal, with an optional interactive text interface (TUI).
- Two install routes: the RPM from Red Hat's Ansible Automation Platform repository (needs a subscription), or
pipinside a Python virtual environment (no subscription). - By default it runs playbooks inside an execution environment container, so you also need Podman and an image to pull.
- If you do not want containers, run with
--execution-environment falseor--ee falseand--mode stdoutto behave likeansible-playbook.
What Ansible Navigator is
Ansible Navigator is a command-line tool that replaces and combines several older commands: ansible-playbook, ansible-doc, ansible-inventory, ansible-config and others. Its main features are:
- An interactive text user interface that lets you browse playbook runs, tasks, hosts, collections and module documentation using the keyboard.
- A standard stdout mode that prints results as ordinary commands do, which suits scripts and CI.
- Support for execution environments (EEs): container images that package ansible-core, collections and their Python dependencies, so a playbook runs the same on any machine.
- Replay of past runs from saved artifact files, which helps when you debug a failure.
Official documentation is at ansible.readthedocs.io/projects/navigator. The wider Ansible documentation describes execution environments in more detail.
Two common mistakes are worth ruling out early: it does not open a GUI in your browser, and it is not installed from EPEL. The correct steps follow.
Before you install
- An RHEL 9 system (or Rocky Linux or AlmaLinux 9) with a user that has
sudo. - For the RPM route, a Red Hat subscription that includes Ansible Automation Platform, and the system registered with
subscription-manager. - For the pip route, a Python version supported by the Navigator release you want. RHEL 9's default Python is 3.9, and recent Navigator releases may need a newer one. Check the project's requirements and, if needed, install a newer interpreter such as
python3.11from the AppStream repository. - Podman for execution environments:
sudo dnf install podman.
Option 1: install from the Red Hat repository
- Register the system and attach a subscription that includes Ansible Automation Platform.
sudo subscription-manager register sudo subscription-manager list --available --matches "*Ansible Automation Platform*" - Enable the repository for your Ansible Automation Platform release. The name contains the release number, so confirm it in the Red Hat documentation before you run the command.
Replacesudo subscription-manager repos --enable ansible-automation-platform-2.x-for-rhel-9-x86_64-rpms2.xwith the release you have access to. - Install the package.
sudo dnf install ansible-navigator - Check it.
ansible-navigator --version
Red Hat's own documentation at docs.redhat.com lists the exact repository names and the supported execution environment images for each release.
Option 2: install with pip in a virtual environment
This route needs no subscription and is the usual one for learning labs. Do not use sudo pip, because it can break system packages that RHEL tools depend on.
sudo dnf install python3.11 python3.11-pip podman
python3.11 -m venv ~/venvs/navigator
source ~/venvs/navigator/bin/activate
pip install ansible-navigator
ansible-navigator --version
If your release works with the default Python 3.9, use python3 -m venv instead. Next time, run source ~/venvs/navigator/bin/activate before using the tool.
First run
Create a tiny playbook, hello.yml:
---
- name: Navigator test
hosts: localhost
gather_facts: false
tasks:
- name: Say hello
ansible.builtin.debug:
msg: "Navigator works"
Now run it in the way that matches your setup.
# Without containers, printing output like ansible-playbook
ansible-navigator run hello.yml --execution-environment false --mode stdout
# With the default container behaviour and the interactive interface
ansible-navigator run hello.yml
The second command pulls an execution environment image the first time, which can take a while. Pulling from Red Hat's registry needs a login first with podman login registry.redhat.io. Inside the interface, type a task number to open its detail, and press the Esc key to go back. Type :q to quit.
Useful commands to try next
| Command | What it does |
|---|---|
ansible-navigator doc ansible.builtin.copy | Shows module documentation, like ansible-doc |
ansible-navigator collections | Lists collections available in the execution environment |
ansible-navigator images | Lists and inspects execution environment images |
ansible-navigator inventory -i inventory | Browses an inventory interactively |
ansible-navigator config | Shows the Ansible configuration in effect |
ansible-navigator replay artifact.json | Replays a saved run |
Troubleshooting
- "No match for argument: ansible-navigator": the repository is not enabled, or the system has no entitlement. EPEL does not provide it. Check
subscription-manager repos --list-enabled, or use the pip route. - Image pull fails with an authentication error: run
podman login registry.redhat.iowith your Red Hat account, or choose an image you can pull without login. - Permission errors with Podman: run Navigator as a normal user with rootless Podman, not as root, unless you know why you need root.
- Python version errors with pip: use a newer interpreter in the virtual environment, as above.
- Playbook cannot see your files: inside an execution environment only mounted paths exist. Run from your project directory and avoid absolute paths outside it.
Where this matters for exams and jobs
Red Hat's current automation training and the Ansible Automation Platform use execution environments and Navigator, so it is worth knowing. Which tool a particular Red Hat exam expects can change between versions, so read the objectives on Red Hat's training and certification site for your exam rather than assuming.
Next steps
If you are new to package management on RHEL, read Linux package managers: APT, YUM and DNF. For guided Ansible practice, see our RHCE EX294 course.
Related reading
Frequently Asked Questions
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Wow
0
Sad
0
Angry
0