Chapter 1. Ansible content navigator
As a content creator, you can use Automation content navigator to develop Ansible playbooks, collections, and roles that are compatible with the Red Hat Ansible Automation Platform. You can use Automation content navigator on local development machines, Automation execution environments or the Red Hat Ansible Automation Platform, with seamless and predictable results across them all. Automation content navigator also produces an artifact file you can use to help you develop your playbooks and troubleshoot problem areas.
1.1. About Automation content navigator
Automation content navigator is a command line, content creator focused tool with a text-based user interface that allows you to:
- Launch and watch jobs and playbooks.
- Share stored, completed playbook and job run artifacts in JSON format.
- Browse and introspect automation execution environments.
- Browse your file-based inventory.
- Render Ansible module documentation and extract examples you can use in your playbooks.
1.1.1. Why use Automation content navigator?
Currently, the Ansible commands that are part of Ansible core, such as the ansible-playbook
command, cannot execute in containers. To fill this need, Automation content navigator enables a set of these Ansible CLI commands within automation execution environments. Automation content navigator includes a more detailed output within its text-based user interface.
1.2. Automation content navigator modes
Automation content navigator operates in two modes:
- stdout mode
- Accepts most of the existing Ansible commands and extensions at the command line.
- text-based user interface mode
- Provides an interactive, text-based interface to the Ansible commands for an enhanced set of capabilities that allow you to evaluate content, run playbooks, and troubleshoot playbooks after they run using artifact files.
1.2.1. stdout mode
If you use the -m stdout
subcommand, Automation content navigator uses the familiar Ansible commands, such as ansible-playbook
within automation execution environments, or on your local development environment. This mode allows you to continue using commands you are familiar with for quick tasks.
Automation content navigator also provides extensive help in this mode:
--help
-
Accessible from
ansible-navigator
command or from any subcommand, such asansible-navigator config --help
. - subcommand help
-
Accessible from the subcommand, for example
ansible-navigator config --help-config
. This subcommand specific help brings in the details of all the parameters supported from the related Ansible command, in this example,ansible-config
.
1.2.2. Text-based user interface mode
The text-based user interface mode provides enhanced interaction with automation execution environments, collections, playbooks, and inventory. This mode is compatible with integrated development environments (IDE), such as Visual Studio Code.
This mode includes a number of helpful user interface options:
- colon commands
-
You can access all the Automation content navigator commands with a colon, such as
:run
or:collections
- navigating the text-based interface
-
The screen shows how to page up or down, scroll, escape to a prior screen or access
:help
. - output by line number
-
You can access any line number in the displayed output by preceding it with a colon, for example
:12
. - color-coded output
- With colors enabled, Automation content navigator displays items such as deprecated modules in red.
- pagination and scrolling
- You can page up or down or scroll and escape using the options displayed at the bottom of each Automation content navigator screen.
You cannot switch between modes once Automation content navigator is running.
1.3. Automation content navigator commands
The Automation content navigator commands run familiar Ansible CLI commands in -m stdout
mode. You can use all of the subcommands and options allowed in the related Ansible CLI command. Use ansible-navigator --help
for details.
Table 1.1. Automation content navigator command table
Command | Description | CLI example |
---|---|---|
collections | Explore available collections |
|
config | Explore the current ansible configuration |
|
doc | Review documentation for a module or plugin |
|
images | Explore execution environment images |
|
inventory | Explore an inventory |
|
replay | Explore a previous run using a playbook artifact |
|
run | Run a playbook |
|
welcome | Start at the welcome page |
|
1.4. Automation content navigator command comparison
The Automation content navigator commands run familiar Ansible CLI commands in -m stdout
mode. You can use all of the subcommands and options allowed in the related Ansible CLI command. Use ansible-navigator --help
for details.
Table 1.2. Comparing Automation content navigator and Ansible CLI commands table
Ansible navigator command | Ansible CLI command |
---|---|
|
|
|
|
|
|
|
|
|
|