Giter VIP home page Giter VIP logo

ansible-navigator's Introduction

ansible-navigator

A TUI for the Red Hat Ansible Automation Platform

asciicast

Quick start

git clone https://github.com/ansible/ansible-navigator.git
mkdir ansible-navigator_demo
cd ansible-navigator_demo
python3 -m venv venv
source venv/bin/activate
pip install -U setuptools
pip install -U ansible
pip install ../ansible-navigator

RHEL8/Centos8 prerequisites:

sudo dnf install python3
sudo dnf install gcc python3-devel

Welcome

Start at the welcome page, from the welcome page you can run playbooks, explore inventories, and review docs

ansible-navigator

Other things to try direct from the command line

Review the help

ansible-navigator --help

Review current configuration (default mode)

ansible-navigator config -m interactive

Review current configuration in classic mode

ansible-navigator config -m stdout dump

Explore available collections

ansible-navigator collections

Review documentation

ansible-navigator doc ansible.netcommon.cli_command

Run and explore a playbook

ansible-navigator run -m interactive site.yaml -i inventory.yaml

Review and explore and inventory

ansible-navigator inventory -i inventory.yaml

Run a playbook with classic output (default mode)

ansible-navigator run -m stdout site.yaml -i inventory.yaml

ansible-navigator.yml example

ansible-navigator:
  container-engine: docker
  editor:
    command: code -g {filename}:{line_number}
    console: False
  execution-environment-image: quay.io/ansible/network-ee
  inventory:
    - ../nav_demo/inventory.yaml
  inventory-columns:
    - ansible_network_os
    - ansible_network_cli_ssh_type
    - ansible_connection
  log:
    level: debug
  no-osc4: True

in app key bindings

## GENERAL
--------------------------------------------------------------------------------------
esc                                     Go back
^f/PgUp                                 Page up
^b/PgDn                                 Page down
arrow up, arrow down                    Scroll up/down
:collections                            Explore installed collections
:config                                 Explore the current Ansible configuration
:d, :doc <plugin>                       Show a plugin doc
:r, :run <playbook> -i <inventory>      Run a playbook using in interactive mode
:f, :filter <re>                        Filter page lines using a regex
:h, :help                               This page
:i, :inventory <inventory>              Explore the current or alternate inventory
:l, :log                                Review current log file
:o, :open                               Open current page in the editor
:o, :open {{ some_key }}                Open file path in a key's value
:q, :quit                               Quit the application
:q!, :quit!, ^c                         Force quit while a playbook is running
:rr, :rerun                             Rerun the playbook
:s, :save <file>                        Save current plays as an artifact
:st, :stream                            Watch playbook results real time
:w, :write <file>                       Write current page to a new file
:w!, :write! <file>                     Write current page to an existing or new file
:w>>, :write>> <file>                   Append current page to an existing file
:w!>>, :write!>> <file>                 Append current page to an existing or new file

## MENUS
--------------------------------------------------------------------------------------
[0-9]                                   Go to menu item
:<number>                               Go to menu item
:{{ n|filter }}                         Template the menu item

## TASKS
--------------------------------------------------------------------------------------
[0-9]                                   Go to task number
:<number>                               Go to task number
+, -                                    Next/Previous task
_, :_                                   Toggle hidden keys
:{{ key|filter }}                       Template the key's value
:d, :doc                                Show the doc for the current task's module
:j, :json                               Switch to JSON serialization
:y, :yaml                               Switch to YAML serialization

## LINE INPUT
--------------------------------------------------------------------------------------
esc                                     Exit line input
^A                                      Beginning of line
^E                                      End of line
insert                                  Enable/disable insert mode
arrow up, arrow down                    Previous/next command in history

ansible-navigator's People

Contributors

abadger avatar ansible-zuul[bot] avatar cidrblock avatar ganeshrn avatar gomathiselvis avatar goneri avatar jborean93 avatar jimi-c avatar relrod avatar ryanpetrello avatar samccann avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.