Code Monkey home page Code Monkey logo

ansible-navigator's Introduction

ansible-navigator

A text-based user interface (TUI) for Ansible.

A demo of the interface can be found on YouTube.

Contributing

Any kind of contribution to this project is very welcome and appreciated, whether it is a documentation improvement, bug report, pull request review, or a patch.

See the Contributing guidelines for details.

Quick start

Installing

Getting started with ansible-navigator is as simple as:

pip3 install 'ansible-navigator[ansible-core]'
ansible-navigator --help

(Users wishing to install within a virtual environment might find the relevant Python documentation useful.)

By default, ansible-navigator uses a container runtime (podman or docker, whichever it finds first) and runs Ansible within an execution environment (a pre-built container image which includes ansible-core along with a set of Ansible collections.)

This default behavior can be disabled by starting ansible-navigator with --execution-environment false. In this case, Ansible and any collections needed must be installed manually on the system.

Additional Linux, macOS and Windows with WSL2 installation instructions are available in the Installation guide.

Welcome

When running ansible-navigator with no arguments, you will be presented with the welcome page. From this page, you can run playbooks, browse collections, explore inventories, read Ansible documentation, and more.

A full list of key bindings can be viewed by typing :help.

Output modes

There are two modes in which ansible-navigator can be run:

  • The interactive mode, which provides a curses-based user interface and allows you to "zoom in" on data in real time, filter it, and navigate between various Ansible components; and
  • The stdout mode, which does not use curses, and simply returns the output to the terminal's standard output stream, as Ansible's commands would.

The interactive mode is the default and this default can be overwritten by passing --mode stdout (-m stdout) or setting mode in configuration.

Example commands

All of ansible-navigator's features can be accessed from the welcome page described above, but as a shortcut, commands can also be provided directly as command-line arguments.

Some examples:

  • Review and explore available collections: ansible-navigator collections
  • Review and explore current Ansible configuration: ansible-navigator config
  • Review and explore Ansible documentation: ansible-navigator doc ansible.netcommon.cli_command
  • Review execution environment images available locally: ansible-navigator images
  • Review and explore an inventory: ansible-navigator inventory -i inventory.yaml
  • Run and explore a playbook: ansible-navigator run site.yaml -i inventory.yaml

Or using the stdout mode described above:

  • Show the current Ansible configuration: ansible-navigator config dump -m stdout
  • Show documentation: ansible-navigator doc sudo -t become -m stdout

... and so on. A full list of subcommands and their relation to Ansible commands can be found in the subcommand documentation.

Configuring ansible-navigator

There are several ways to configure ansible-navigator and users and projects are free to choose the most convenient method for them. The full hierarchy of how various configuration sources are applied can be found in the FAQ mentioned below.

Of note, projects making use of ansible-navigator can include a project-wide configuration file with the project. If one is not found, ansible-navigator will look for a user-specific configuration file in the user's home directory. Details about this can be found in the settings documentation.

Frequently Asked Questions (FAQ)

We maintain a list of common questions which provides a good resource to check if something is tripping you up. We also encourage additions to this document for the greater community!

License

ansible-navigator is released under the Apache License version 2. See the LICENSE file for more details.

ansible-navigator's People

Contributors

abadger avatar akira6592 avatar alisonlhart avatar andersson007 avatar ansible-zuul[bot] avatar brakkio86 avatar cidrblock avatar cristianonicolai avatar dependabot[bot] avatar eamigo avatar ganeshrn avatar gomathiselvis avatar jborean93 avatar kb-perbyte avatar nilashishc avatar pcfe avatar pre-commit-ci[bot] avatar relrod avatar richm avatar rseabra avatar s-hertel avatar samccann avatar shatakshiiii avatar simaishi avatar spredzy avatar ssbarnea avatar thedoubl3j avatar timway avatar tony avatar webknjaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ansible-navigator's Issues

Try changing tmux test loop to not look for :help help

capture screen before and after to detect changes

something like this

        """interact with the tmux session"""
        start_time = date.now()
        current_screen = self._pane.capture_pane()
        self._pane.send_keys(value, suppress_history=False)
        updated_screen = self._pane.capture_pane()
        while current_screen == updated_screen:
            time.sleep(0.1)
            updated_screen = self._pane.capture_pane()
            if date.now() == start_time > 10s:
                break
        return updated_screen

Stacktrace if inventory-columns does not exist in return value from action

    return self._menu(dicts, cols, indicies)
  File "/home/ansible-navigator/ansible_navigator/ui_framework/menu_builder.py", line 52, in _menu
    convert_percentage(dicts[idx], cols, self._pbar_width)
  File "/home/ansible-navigator/ansible_navigator/ui_framework/utils.py", line 23, in convert_percentage
    value = dyct[key]
KeyError: 'ansible_network_cli_ssh_type'

Config

---
ansible-navigator:
  inventory-columns:
    - ansible_network_os
    - ansible_network_cli_ssh_type
    - ansible_connection
  log:
    level: debug
  no-osc4: True

using `rerun` option with ansible-launcher load traces back

Traceback (most recent call last):
  File "/home/gmuniz/Documents/ansible_navigator/ansible-navigator/bin/ansible-launcher", line 33, in <module>
    sys.exit(load_entry_point('ansible-launcher==0.6.0', 'console_scripts', 'ansible-launcher')())
  File "/home/gmuniz/Documents/ansible_navigator/ansible-navigator/lib64/python3.9/site-packages/ansible_launcher/cli.py", line 294, in main
    run(args)
  File "/home/gmuniz/Documents/ansible_navigator/ansible-navigator/lib64/python3.9/site-packages/ansible_launcher/cli.py", line 260, in run
    wrapper(ActionRunner(args=args).run)
  File "/usr/lib64/python3.9/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "/home/gmuniz/Documents/ansible_navigator/ansible-navigator/lib64/python3.9/site-packages/ansible_launcher/action_runner.py", line 51, in run
    self._run_app(interaction)
  File "/home/gmuniz/Documents/ansible_navigator/ansible-navigator/lib64/python3.9/site-packages/ansible_launcher/action_runner.py", line 60, in _run_app
    interaction = run_action(
  File "/home/gmuniz/Documents/ansible_navigator/ansible-navigator/lib64/python3.9/site-packages/ansible_launcher/actions/_actions.py", line 68, in call
    return action_cls(app.args).run(app=app, interaction=interaction)
  File "/home/gmuniz/Documents/ansible_navigator/ansible-navigator/lib64/python3.9/site-packages/ansible_launcher/actions/explore.py", line 309, in run
    self._take_step()
  File "/home/gmuniz/Documents/ansible_navigator/ansible-navigator/lib64/python3.9/site-packages/ansible_launcher/actions/explore.py", line 504, in _take_step
    result = run_action(
  File "/home/gmuniz/Documents/ansible_navigator/ansible-navigator/lib64/python3.9/site-packages/ansible_launcher/actions/_actions.py", line 68, in call
    return action_cls(app.args).run(app=app, interaction=interaction)
  File "/home/gmuniz/Documents/ansible_navigator/ansible-navigator/lib64/python3.9/site-packages/ansible_launcher/actions/rerun.py", line 35, in run
    app.rerun()
  File "/home/gmuniz/Documents/ansible_navigator/ansible-navigator/lib64/python3.9/site-packages/ansible_launcher/actions/explore.py", line 808, in rerun
    if self.runner.finished:
AttributeError: 'NoneType' object has no attribute 'finished'

Ansible-launcher playbook hangs indefinitely with no progress or logging when ask vault pass enabled in ansible.cfg

Issue

When launching a playbook with ansible-launcher, the interface hangs indefinitely with no logging. Strace shows child process is stuck in "read"

Replication

  1. ANSIBLE_ASK_VAULT_PASS=True ansible-launcher playbook ping.yml --limit localhost -ll debug
  2. Wait a few minutes

Expected Results

Job runs

Observed Result

Hangs indefinitely

Additional Info

python --version
Python 3.6.8

cat /etc/os-release 
NAME="Red Hat Enterprise Linux"
VERSION="8.3 (Ootpa)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="8.3"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Red Hat Enterprise Linux 8.3 (Ootpa)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:8.3:GA"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_BUGZILLA_PRODUCT_VERSION=8.3
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.3"

Some exact behavior also replicated in Fedora 32 with python 3.8.

strace

strace -p 10575
strace: Process 10575 attached
read(3,

lsof

COMMAND     PID     USER   FD   TYPE DEVICE  SIZE/OFF      NODE NAME
ansible-p 10575 jamarsha  cwd    DIR  253,1        34  92274824 /tmp/tmpcb8bnno0
ansible-p 10575 jamarsha  rtd    DIR  253,1       280       128 /
ansible-p 10575 jamarsha  txt    REG  253,1     11744   5162649 /usr/libexec/platform-python3.6
ansible-p 10575 jamarsha  mem    REG  253,1     65848    201839 /usr/lib64/python3.6/lib-dynload/array.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,1     11560    201855 /usr/lib64/python3.6/lib-dynload/syslog.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,2   7594752 149292490 /home/jamarsha/Projects/winston/lib/python3.6/site-packages/cryptography/hazmat/bindings/_openssl.abi3.so
ansible-p 10575 jamarsha  mem    REG  253,1     88680    421380 /usr/lib64/python3.6/lib-dynload/_socket.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,1     17064    873407 /usr/lib64/python3.6/lib-dynload/_hmacopenssl.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,2     46632 138166488 /home/jamarsha/Projects/winston/lib/python3.6/site-packages/cffi.libs/libffi-806b1a9d.so.6.0.4
ansible-p 10575 jamarsha  mem    REG  253,2    856392  28050734 /home/jamarsha/Projects/winston/lib/python3.6/site-packages/_cffi_backend.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,1      7264    201829 /usr/lib64/python3.6/lib-dynload/_opcode.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,1     33232   4202896 /usr/lib64/libuuid.so.1.3.0
ansible-p 10575 jamarsha  mem    REG  253,1     37024   4203562 /usr/lib64/libffi.so.6.0.2
ansible-p 10575 jamarsha  mem    REG  253,1    129136    201813 /usr/lib64/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,1    208616   4202826 /usr/lib64/libtinfo.so.6.1
ansible-p 10575 jamarsha  mem    REG  253,1    300104   4202818 /usr/lib64/libncursesw.so.6.1
ansible-p 10575 jamarsha  mem    REG  253,1     96560    873400 /usr/lib64/python3.6/lib-dynload/_curses.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,1     29040    201853 /usr/lib64/python3.6/lib-dynload/select.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,1     16368    421377 /usr/lib64/python3.6/lib-dynload/_posixsubprocess.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,1     25672    421392 /usr/lib64/python3.6/lib-dynload/termios.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,1     19232    201843 /usr/lib64/python3.6/lib-dynload/fcntl.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,2   1822446  85723957 /home/jamarsha/Projects/winston/lib/python3.6/site-packages/yaml/_yaml.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,1     30632    201841 /usr/lib64/python3.6/lib-dynload/binascii.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,1    115008    201816 /usr/lib64/python3.6/lib-dynload/_datetime.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,1    899352    421393 /usr/lib64/python3.6/lib-dynload/unicodedata.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,1    311032    201818 /usr/lib64/python3.6/lib-dynload/_decimal.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,1     79896    873408 /usr/lib64/python3.6/lib-dynload/_json.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,1    131360    421376 /usr/lib64/python3.6/lib-dynload/_pickle.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,1     20304    421378 /usr/lib64/python3.6/lib-dynload/_random.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,1     13464    201802 /usr/lib64/python3.6/lib-dynload/_bisect.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,1    110408    421379 /usr/lib64/python3.6/lib-dynload/_sha3.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,1    129304    873397 /usr/lib64/python3.6/lib-dynload/_blake2.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,1    615560   5421808 /usr/lib64/libssl.so.1.1.1g
ansible-p 10575 jamarsha  mem    REG  253,1     47704    201821 /usr/lib64/python3.6/lib-dynload/_hashlib.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,1     59144    421388 /usr/lib64/python3.6/lib-dynload/math.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,2     46832 137763740 /home/jamarsha/Projects/winston/lib/python3.6/site-packages/markupsafe/_speedups.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,1     52480    421383 /usr/lib64/python3.6/lib-dynload/_struct.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,1     12976    421387 /usr/lib64/python3.6/lib-dynload/grp.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,1    192016   4203342 /usr/lib64/liblzma.so.5.2.4
ansible-p 10575 jamarsha  mem    REG  253,1     42624    201826 /usr/lib64/python3.6/lib-dynload/_lzma.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,1     74744   4203415 /usr/lib64/libbz2.so.1.0.6
ansible-p 10575 jamarsha  mem    REG  253,1     22824    873398 /usr/lib64/python3.6/lib-dynload/_bz2.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,1     34168    201923 /usr/lib64/python3.6/lib-dynload/zlib.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,1     22808    873406 /usr/lib64/python3.6/lib-dynload/_heapq.cpython-36m-x86_64-linux-gnu.so
ansible-p 10575 jamarsha  mem    REG  253,1 217796128   4202871 /usr/lib/locale/locale-archive
ansible-p 10575 jamarsha  mem    REG  253,1     95400   4202879 /usr/lib64/libz.so.1.2.11
ansible-p 10575 jamarsha  mem    REG  253,1   3154704   4202845 /usr/lib64/libc-2.28.so
ansible-p 10575 jamarsha  mem    REG  253,1   2191808   5754900 /usr/lib64/libm-2.28.so
ansible-p 10575 jamarsha  mem    REG  253,1     23392   4202867 /usr/lib64/libutil-2.28.so
ansible-p 10575 jamarsha  mem    REG  253,1     28968   5754898 /usr/lib64/libdl-2.28.so
ansible-p 10575 jamarsha  mem    REG  253,1    320504   5754906 /usr/lib64/libpthread-2.28.so
ansible-p 10575 jamarsha  mem    REG  253,1   3285544   5563349 /usr/lib64/libpython3.6m.so.1.0
ansible-p 10575 jamarsha  mem    REG  253,1   3071448   5162641 /usr/lib64/libcrypto.so.1.1.1g
ansible-p 10575 jamarsha  mem    REG  253,1    252280   4773589 /usr/lib64/ld-2.28.so
ansible-p 10575 jamarsha  mem    REG  253,2     39888 149292488 /home/jamarsha/Projects/winston/lib/python3.6/site-packages/cryptography/hazmat/bindings/_padding.abi3.so
ansible-p 10575 jamarsha  mem    REG  253,1     26998   8863610 /usr/lib64/gconv/gconv-modules.cache
ansible-p 10575 jamarsha    0u   CHR  136,1       0t0         4 /dev/pts/1
ansible-p 10575 jamarsha    1u   CHR  136,1       0t0         4 /dev/pts/1
ansible-p 10575 jamarsha    2u   CHR  136,1       0t0         4 /dev/pts/1
ansible-p 10575 jamarsha    3u   CHR    5,0       0t0      1041 /dev/tty

ansible_launcher.log

210318002319.271 DEBUG 'ansible_launcher.main' No config file file found
210318002319.271 DEBUG 'ansible_launcher.main' Collection doc cache: path=/home/jamarsha/.cache/ansible_launcher/collection_doc_cache.db
210318002319.271 DEBUG 'ansible_launcher.main' Collection doc cache: current version=0.6.0
210318002319.273 DEBUG 'ansible_launcher.main' ansible-playbook found at /home/jamarsha/Projects/winston/bin/ansible-playbook
210318002319.273 DEBUG 'ansible_launcher.main' Running with container_engine=podman <class 'str'>
210318002319.273 DEBUG 'ansible_launcher.main' Running with execution_environment=False <class 'bool'>
210318002319.273 DEBUG 'ansible_launcher.main' Running with ee_image=quay.io/ansible/ansible-runner:devel <class 'str'>
210318002319.273 DEBUG 'ansible_launcher.main' Running with inventory_columns= <class 'str'>
210318002319.273 DEBUG 'ansible_launcher.main' Running with ide=vim <class 'str'>
210318002319.273 DEBUG 'ansible_launcher.main' Running with logfile=/home/jamarsha/Projects/test/ansible_launcher.log <class 'str'>
210318002319.273 DEBUG 'ansible_launcher.main' Running with loglevel=debug <class 'str'>
210318002319.273 DEBUG 'ansible_launcher.main' Running with no_osc4=False <class 'bool'>
210318002319.273 DEBUG 'ansible_launcher.main' Running with web=False <class 'bool'>
210318002319.273 DEBUG 'ansible_launcher.main' Running with app=playbook <class 'str'>
210318002319.273 DEBUG 'ansible_launcher.main' Running with playbook=/home/jamarsha/Projects/test/ping.yml <class 'str'>
210318002319.273 DEBUG 'ansible_launcher.main' Running with artifact=/home/jamarsha/Projects/test/ping_artifact.json <class 'str'>
210318002319.273 DEBUG 'ansible_launcher.main' Running with inventory=[] <class 'list'>
210318002319.273 DEBUG 'ansible_launcher.main' Running with requires_ansible=True <class 'bool'>
210318002319.273 DEBUG 'ansible_launcher.main' Running with cmdline=['--limit', 'localhost'] <class 'list'>
210318002319.273 DEBUG 'ansible_launcher.main' Running with editor=vi +{line_number} {filename} <class 'str'>
210318002319.273 DEBUG 'ansible_launcher.main' Running with editor_is_console=True <class 'bool'>
210318002319.273 DEBUG 'ansible_launcher.main' Running with share_dir=/home/jamarsha/Projects/winston/share/ansible_launcher <class 'str'>
210318002319.273 DEBUG 'ansible_launcher.main' Running with cache_dir=/home/jamarsha/.cache/ansible_launcher <class 'str'>
210318002319.273 DEBUG 'ansible_launcher.main' Running with collection_doc_cache={} <class 'kvs.KeyValueStore'>
210318002319.273 DEBUG 'ansible_launcher.main' Running with original_command=['--ide', 'vscode', 'playbook', 'ping.yml', '--limit', 'localhost', '-ll', 'debug'] <class 'list'>
210318002319.274 DEBUG 'ansible_launcher.main' Running with parse_and_update=<function parse_and_update at 0x7fcda913a730> <class 'function'>
210318002319.274 DEBUG 'ansible_launcher.actions.explore.16e8.playbook' subaction type is playbook
210318002319.274 DEBUG 'ansible_launcher.actions._runner.run' Runner arg: json_mode:True
210318002319.274 DEBUG 'ansible_launcher.actions._runner.run' Runner arg: quiet:True
210318002319.274 DEBUG 'ansible_launcher.actions._runner.run' Runner arg: event_handler:<bound method PlaybookRunner._event_handler of <ansible_launcher.actions._runner.PlaybookRunner object at 0x7fcda914c320>>
210318002319.274 DEBUG 'ansible_launcher.actions._runner.run' Runner arg: envvars:{'ANSIBLE_CONFIG': '/home/jamarsha/.config/ansible/ansible.cfg'}
210318002319.274 DEBUG 'ansible_launcher.actions._runner.run' Runner arg: cancel_callback:<bound method PlaybookRunner.runner_cancelled_callback of <ansible_launcher.actions._runner.PlaybookRunner object at 0x7fcda914c320>>
210318002319.274 DEBUG 'ansible_launcher.actions._runner.run' Runner arg: finished_callback:<bound method PlaybookRunner.runner_finished_callback of <ansible_launcher.actions._runner.PlaybookRunner object at 0x7fcda914c320>>
210318002319.274 DEBUG 'ansible_launcher.actions._runner.run' Runner arg: cmdline:--limit localhost
210318002319.274 DEBUG 'ansible_launcher.actions._runner.run' Runner arg: inventory:[]
210318002319.274 DEBUG 'ansible_launcher.actions._runner.run' Runner arg: playbook:/home/jamarsha/Projects/test/ping.yml
210318002319.276 DEBUG 'ansible_launcher.actions.explore.16e8._run_runner' runner requested to start
210318002348.272 WARNING 'ansible_launcher.run' Dirty exit, killing the pid

pip freeze for venv

pip freeze | grep -i ansible
ansible==2.9.18
ansible-launcher==0.6.0
ansible-runner @ git+https://github.com/ansible/ansible-runner.git@3925b6b426dca1c30e7fb410b270cd97068458aa

`ansible-launcher collections` is not functioning

ansible-launcher collections is not functioning, it just blips then returns to previous command prompt (for both cli and within ansible-launcher shell)

I installed a couple really quickly to try it out->

(venv) [student1@ansible-1 ~]$ ls ~/.ansible/collections/ansible_collections/
ansible  cisco

no dice :(

I did start when there was 0...

Screen.Recording.2021-03-15.at.3.04.57.PM.mov

:doc is not working on a fresh install

I've just installed winston and ran it. Then trying to execute :doc from the main screen is raising the following exception:

Traceback (most recent call last):
  File "/home/elyezer/.virtualenvs/winston/bin/winston", line 33, in <module>
    sys.exit(load_entry_point('winston', 'console_scripts', 'winston')())
  File "/home/elyezer/code/ansible/winston/winston/cli.py", line 294, in main
    run(args)
  File "/home/elyezer/code/ansible/winston/winston/cli.py", line 260, in run
    wrapper(ActionRunner(args=args).run)
  File "/usr/lib64/python3.9/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "/home/elyezer/code/ansible/winston/winston/action_runner.py", line 51, in run
    self._run_app(interaction)
  File "/home/elyezer/code/ansible/winston/winston/action_runner.py", line 60, in _run_app
    interaction = run_action(
  File "/home/elyezer/code/ansible/winston/winston/actions/_actions.py", line 68, in call
    return action_cls(app.args).run(app=app, interaction=interaction)
  File "/home/elyezer/code/ansible/winston/winston/actions/doc.py", line 45, in run
    plugin = interaction.content.showing["task_action"]
TypeError: string indices must be integers

I am currently trying on Python 3.9 on Fedora 33.

:config from welcome screen produces garbage when mode is stdout

When running ansible-navigator with no params and mode set to stdout, the welcome screen is presented.

Typing :config results in the config output on the screen instead of the TUI config mode.

Should we force interactive mode on if no params followed ansible-navigator at the command line?

210406134434.904 DEBUG 'ansible_navigator.main' ini entry: container_engine matched to arg: container_engine
210406134434.904 DEBUG 'ansible_navigator.main' container_engine was not provided, using 'docker'
210406134434.904 DEBUG 'ansible_navigator.main' ini entry: ee_image matched to arg: ee_image
210406134434.904 DEBUG 'ansible_navigator.main' ee_image was not provided, using 'quay.io/ansible/network-ee'
210406134434.904 DEBUG 'ansible_navigator.main' ini entry: execution_environment matched to arg: execution_environment
210406134434.904 DEBUG 'ansible_navigator.main' execution_environment was default, using entry 'False'
210406134434.904 DEBUG 'ansible_navigator.main' ini entry: ide matched to arg: ide
210406134434.904 DEBUG 'ansible_navigator.main' ide was not provided, using 'vscode'
210406134434.904 DEBUG 'ansible_navigator.main' ini entry: inventory_columns matched to arg: inventory_columns
210406134434.904 DEBUG 'ansible_navigator.main' inventory_columns was not provided, using 'ansible_network_os,ansible_network_cli_ssh_type,ansible_connection'
210406134434.904 DEBUG 'ansible_navigator.main' ini entry: loglevel matched to arg: loglevel
210406134434.904 DEBUG 'ansible_navigator.main' loglevel was not provided, using 'debug'
210406134434.904 DEBUG 'ansible_navigator.main' ini entry: no_osc4 matched to arg: no_osc4
210406134434.904 DEBUG 'ansible_navigator.main' no_osc4 was default, using entry 'True'
210406134434.904 DEBUG 'ansible_navigator.main' ini entry: mode matched to arg: navigator_mode
210406134434.904 DEBUG 'ansible_navigator.main' navigator_mode was not provided, using 'stdout'
210406134434.904 DEBUG 'ansible_navigator.main' Collection doc cache: path=/Users/bthornto/.cache/ansible_navigator/collection_doc_cache.db
210406134434.904 DEBUG 'ansible_navigator.main' Collection doc cache: current version=0.6.0
210406134434.911 DEBUG 'ansible_navigator.main' ansible-playbook found at /Users/bthornto/github/ansible-navigator/venv/bin/ansible-playbook
210406134434.912 DEBUG 'ansible_navigator.main' Running with container_engine=docker <class 'str'>
210406134434.912 DEBUG 'ansible_navigator.main' Running with execution_environment=False <class 'bool'>
210406134434.912 DEBUG 'ansible_navigator.main' Running with ee_image=quay.io/ansible/network-ee <class 'str'>
210406134434.912 DEBUG 'ansible_navigator.main' Running with inventory_columns=ansible_network_os,ansible_network_cli_ssh_type,ansible_connection <class 'str'>
210406134434.912 DEBUG 'ansible_navigator.main' Running with ide=vscode <class 'str'>
210406134434.912 DEBUG 'ansible_navigator.main' Running with logfile=/Users/bthornto/github/ansible-navigator/ansible_navigator.log <class 'str'>
210406134434.912 DEBUG 'ansible_navigator.main' Running with loglevel=debug <class 'str'>
210406134434.912 DEBUG 'ansible_navigator.main' Running with no_osc4=True <class 'bool'>
210406134434.912 DEBUG 'ansible_navigator.main' Running with navigator_mode=stdout <class 'str'>
210406134434.912 DEBUG 'ansible_navigator.main' Running with app=config <class 'str'>
210406134434.912 DEBUG 'ansible_navigator.main' Running with cmdline=['list'] <class 'list'>
210406134434.912 DEBUG 'ansible_navigator.main' Running with editor=code -g {filename}:{line_number} <class 'str'>
210406134434.912 DEBUG 'ansible_navigator.main' Running with editor_is_console=False <class 'bool'>
210406134434.912 DEBUG 'ansible_navigator.main' Running with share_dir=/Users/bthornto/github/ansible-navigator/ansible_navigator/../share/ansible_navigator <class 'str'>
210406134434.912 DEBUG 'ansible_navigator.main' Running with cache_dir=/Users/bthornto/.cache/ansible_navigator <class 'str'>
210406134434.912 DEBUG 'ansible_navigator.main' Running with collection_doc_cache={} <class 'kvs.KeyValueStore'>
210406134434.912 DEBUG 'ansible_navigator.main' Running with original_command=['config', 'list'] <class 'list'>
210406134434.912 DEBUG 'ansible_navigator.main' Running with parse_and_update=<function parse_and_update at 0x1083b8040> <class 'function'>
210406134435.025 DEBUG 'ansible_navigator.actions.config.run_stdout' config requested in stdout mode
210406134435.025 DEBUG 'ansible_navigator.runner.api.generate_run_command_args' Runner arg: json_mode:True
210406134435.026 DEBUG 'ansible_navigator.runner.api.generate_run_command_args' Runner arg: quiet:True
210406134435.026 DEBUG 'ansible_navigator.runner.api.generate_run_command_args' Runner arg: envvars:{}
210406134435.026 DEBUG 'ansible_navigator.runner.api.generate_run_command_args' Runner arg: cancel_callback:<bound method BaseRunner.runner_cancelled_callback of <ansible_navigator.runner.api.CommandRunner object at 0x10a15bdc0>>
210406134435.026 DEBUG 'ansible_navigator.runner.api.generate_run_command_args' Runner arg: finished_callback:<bound method BaseRunner.runner_finished_callback of <ansible_navigator.runner.api.CommandRunner object at 0x10a15bdc0>>
210406134435.026 DEBUG 'ansible_navigator.runner.api.generate_run_command_args' Runner arg: cwd:/Users/bthornto/github/ansible-navigator
210406134435.026 DEBUG 'ansible_navigator.runner.api.generate_run_command_args' Runner arg: input_fd:<_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'>
210406134435.026 DEBUG 'ansible_navigator.runner.api.generate_run_command_args' Runner arg: output_fd:<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>
210406134435.026 DEBUG 'ansible_navigator.runner.api.generate_run_command_args' Runner arg: error_fd:<_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>
210406134435.026 DEBUG 'ansible_navigator.runner.api.generate_run_command_args' Runner arg: executable_cmd:/Users/bthornto/github/ansible-navigator/venv/bin/ansible-config
210406134435.026 DEBUG 'ansible_navigator.runner.api.generate_run_command_args' Runner arg: cmdline_args:['list']

Pare/remove `share` dir

As we've already encountered, the share dir can cause problems during development and packaging. It seems like most of the items there should just be under various datafile subpackages in the main project tree, and the couple of items that we really want to be user-configurable/augmentable should just be loadable from config dirs (which can be located using something akin to what's there now). At first blush, it seems like themes are the only item that currently falls into that category, or am I wrong?

My primary concern is that we don't repeat the mistakes of /etc/ansible.cfg and never being able to effectively change or augment defaults by laying down a live all-encompassing config file.

Add subparse for config action

Add argument subparser for config action to parse ansible-config command-line option to accept path of the configuration file as input in Text user interface (TUI) mode.

Timing of unit tests

Some units tests should be timed, although we might not be able to fail based on a threshold value, having the data would be good.

Example-

tokenize large yaml file
catalog collections
others?

ansible-launcher messes up with the user's terminal colorscheme

Before running ansible-launcher:

before-running

Then run ansible-launcher and immediately quit:

after-running

In order to restore the colorscheme I had to restart the terminal session.

I was using Windows Terminal and running ansible-launcher from an SSH connection to my Linux working laptop.

winston explorer fails with stacktrace in curses module for python 3.8.3 on macos

$winston explore cli_parse_test.yaml -i inventory 
Traceback (most recent call last):
  File "/Users/gnalawad/Documents/ganeshrn/avenv38/bin/winston", line 6, in <module>
    from winston.cli import main
  File "/Users/gnalawad/Documents/ganeshrn/github/ansible-network/winston/winston/cli.py", line 19, in <module>
    from .action_runner import ActionRunner
  File "/Users/gnalawad/Documents/ganeshrn/github/ansible-network/winston/winston/action_runner.py", line 8, in <module>
    from .explorer_ui import ExplorerUi as Ui
  File "/Users/gnalawad/Documents/ganeshrn/github/ansible-network/winston/winston/explorer_ui.py", line 7, in <module>
    from .ui import UserInterface
  File "/Users/gnalawad/Documents/ganeshrn/github/ansible-network/winston/winston/ui.py", line 26, in <module>
    from .colorize import Colorize, rgb_to_ansi, hex_to_rgb_curses
  File "/Users/gnalawad/Documents/ganeshrn/github/ansible-network/winston/winston/colorize.py", line 24, in <module>
    3: curses.A_ITALIC,
AttributeError: module 'curses' has no attribute 'A_ITALIC'

run command does not prompt form if inventory is not provided

In case multiple invalid inventory sources are provided to the run command in that case a form is prompted asking for the correct inventory path. However if no inventory source is provided inventory option input is not present in the form.

example command
Mulitple invalid inventory source (working scenario)

ansible-navigator run gather.yaml -i test1 -i test2

No inventory source. Ensure inventory is not set in the config file (failing scenario)

ansible-navigator run gather.yaml 

`ansible-navigator collections` fails when a collection is missing `plugins` directory.

ansible-navigator collections fails when an installed collection is missing plugins directory. The terminal window resets after running the command.

ansible-navigator collections --ll debug && cat ansible_navigator.log

  File "/home/craig/.virtualenvs/ansible_explorer/share/ansible_navigator/utils/catalog_collections.py", line 66, in _catalog_plugins
    for f in os.scandir(path + "plugins")
FileNotFoundError: [Errno 2] No such file or directory: '/home/craig/.ansible/collections/ansible_collections/redhat_cop/tower_utilities/plugins'

If I create the ~/.ansible/collections/ansible_collections/redhat_cop/tower_utilities/plugins directory, it works perfectly

KeyError exception when trying to browse group on inventory

I have run :inventory then filled the path to the following inventory on the form and submitted it.

[all]
ec2-54-86-73-255.compute-1.amazonaws.com ansible_user=ec2-user ansible_host=54.86.73.255 ansible_python_interpreter="/usr/libexec/platform-python"
localhost ansible_connection=local ansible_python_interpreter="/usr/libexec/platform-python"

[ungrouped]

[local]
localhost ansible_connection=local ansible_python_interpreter="/usr/libexec/platform-python"

[cloud]
ec2-54-86-73-255.compute-1.amazonaws.com ansible_user=ec2-user ansible_host=54.86.73.255 ansible_python_interpreter="/usr/libexec/platform-python"

[ec2]
ec2-54-86-73-255.compute-1.amazonaws.com ansible_user=ec2-user ansible_host=54.86.73.255 ansible_python_interpreter="/usr/libexec/platform-python"

[rhel-8.3-x86_64]
ec2-54-86-73-255.compute-1.amazonaws.com ansible_user=ec2-user ansible_host=54.86.73.255 ansible_python_interpreter="/usr/libexec/platform-python"

[tower]
ec2-54-86-73-255.compute-1.amazonaws.com ansible_user=ec2-user ansible_host=54.86.73.255 ansible_python_interpreter="/usr/libexec/platform-python"

[instance_group_non_default]
ec2-54-86-73-255.compute-1.amazonaws.com ansible_user=ec2-user ansible_host=54.86.73.255 ansible_python_interpreter="/usr/libexec/platform-python"

Then selected 0 Browse Groups and then 0 cloud and the following exception was raised:

Traceback (most recent call last):
  File "/home/elyezer/.virtualenvs/winston/bin/winston", line 33, in <module>
    sys.exit(load_entry_point('winston', 'console_scripts', 'winston')())
  File "/home/elyezer/code/ansible/winston/winston/cli.py", line 294, in main
    run(args)
  File "/home/elyezer/code/ansible/winston/winston/cli.py", line 260, in run
    wrapper(ActionRunner(args=args).run)
  File "/usr/lib64/python3.9/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "/home/elyezer/code/ansible/winston/winston/action_runner.py", line 51, in run
    self._run_app(interaction)
  File "/home/elyezer/code/ansible/winston/winston/action_runner.py", line 60, in _run_app
    interaction = run_action(
  File "/home/elyezer/code/ansible/winston/winston/actions/_actions.py", line 68, in call
    return action_cls(app.args).run(app=app, interaction=interaction)
  File "/home/elyezer/code/ansible/winston/winston/actions/inventory.py", line 193, in run
    self._take_step()
  File "/home/elyezer/code/ansible/winston/winston/actions/inventory.py", line 241, in _take_step
    result = self._interaction.ui.show(
  File "/home/elyezer/code/ansible/winston/winston/ui_framework/ui.py", line 855, in show
    result = self._show_menu(obj, columns, await_input)
  File "/home/elyezer/code/ansible/winston/winston/ui_framework/ui.py", line 790, in _show_menu
    menu_heading, menu_lines = self._get_heading_menu_items(current, columns, showing_idxs)
  File "/home/elyezer/code/ansible/winston/winston/ui_framework/ui.py", line 750, in _get_heading_menu_items
    menu_heading, menu_items = menu_builder.build(
  File "/home/elyezer/code/ansible/winston/winston/ui_framework/menu_builder.py", line 39, in build
    return self._menu(dicts, cols, indicies)
  File "/home/elyezer/code/ansible/winston/winston/ui_framework/menu_builder.py", line 56, in _menu
    convert_percentage(dicts[idx], cols, self._pbar_width)
  File "/home/elyezer/code/ansible/winston/winston/ui_framework/utils.py", line 23, in convert_percentage
    value = dyct[key]
KeyError: ''

Update configuration docs based on config subsystem

we should be able to generate docs from the navigator_configuration object now
will need to show the environment variable for each configuration option as well

Should we have a supplemental file (yaml, json) for longer descriptions, usage, example that can help add details to the docs

UI crashes if the task fails with error

$winston explore cli_parse_test.yaml -i inventory 
Traceback (most recent call last):
  File "/Users/gnalawad/Documents/ganeshrn/avenv38/bin/winston", line 10, in <module>
    sys.exit(main())
  File "/Users/gnalawad/Documents/ganeshrn/github/ansible-network/winston/winston/cli.py", line 186, in main
    wrapper(app)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/curses/__init__.py", line 105, in wrapper
    return func(stdscr, *args, **kwds)
  File "/Users/gnalawad/Documents/ganeshrn/github/ansible-network/winston/winston/player.py", line 322, in explore
    self._run_app()
  File "/Users/gnalawad/Documents/ganeshrn/github/ansible-network/winston/winston/player.py", line 351, in _run_app
    interaction = self._ui.show(
  File "/Users/gnalawad/Documents/ganeshrn/github/ansible-network/winston/winston/ui.py", line 1064, in show
    result = self._show_obj_from_list(obj, index, xform or self._xform, await_input)
  File "/Users/gnalawad/Documents/ganeshrn/github/ansible-network/winston/winston/ui.py", line 893, in _show_obj_from_list
    heading, lines = self._filter_and_serialize(objs[index], xform)
  File "/Users/gnalawad/Documents/ganeshrn/github/ansible-network/winston/winston/ui.py", line 874, in _filter_and_serialize
    heading = self._custom_heading(obj)
  File "/Users/gnalawad/Documents/ganeshrn/github/ansible-network/winston/winston/explorer_ui.py", line 120, in _custom_heading
    msg = obj["res"]["msg"].replace("\n", " ").replace("\r", "")
AttributeError: 'list' object has no attribute 'replace'

Playbook:
In my case first task is passing and second tasks fail (intentionally) as the command is invalid.

- hosts: nxos
  connection: ansible.netcommon.network_cli
  gather_facts: false
  tasks:
  - name: "Run command and parse with textfsm"
    ansible.utils.cli_parse:
      command: "show version"
      parser:
        name: ansible.netcommon.textfsm
    register: nxos_textfsm_command

  - name: Pass text and command
    ansible.netcommon.cli_parse:
      command: show interfaces
      parser:
          name: ansible.netcommon.pyats
          command: show interfaces
    register: parser_output

Actual playbook logs:

$winston playbook cli_parse_test.yaml -i inventory  
[DEPRECATION WARNING]: Use 'ansible.utils.cli_parse' instead. See the plugin 
documentation for more details. This feature will be removed from 
ansible.netcommon in a release after 2022-11-01. Deprecation warnings can be 
disabled by setting deprecation_warnings=False in ansible.cfg.

PLAY [nxos] ********************************************************************

TASK [Run command and parse with textfsm] **************************************
Thursday 10 December 2020  17:26:01 +0530 (0:00:00.137)       0:00:00.137 ***** 
[WARNING]: Use 'ansible.utils.textfsm' for parser name instead of
'ansible.netcommon.textfsm'. This feature will be removed from
'ansible.netcommon' collection in a release after 2022-11-01
ok: [nxos02]

TASK [Pass text and command] ***************************************************
Thursday 10 December 2020  17:26:08 +0530 (0:00:06.934)       0:00:07.071 ***** 
fatal: [nxos02]: FAILED! => {"changed": false, "msg": ["show interfaces\r\r\n                          ^\r\n% Invalid command at '^' marker.\r\n\ran-nxos-02# "]}

PLAY RECAP *********************************************************************
nxos02                     : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

Thursday 10 December 2020  17:26:10 +0530 (0:00:01.886)       0:00:08.957 ***** 
=============================================================================== 
Run command and parse with textfsm -------------------------------------- 6.93s
Pass text and command --------------------------------------------------- 1.89s

NavigatorConfig.get should return an enum + value

Rather than returning a string describing where a request config entry was found, return an enum/const of something not a string.

When the log entry is generated, use string that cooresponds to the enum/const that it returned.

This will clean up the tests as we can assert on a well known value and not the string

{{ examples | from_yaml }} can cause ansible-navigator to crash

In interactive mode, I can type :doc ansible.buildin.file and then pull the examples out with {{ examples }}.

But when I do this same thing on that module with {{ examples | from_yaml }} it spits out a traceback and crashes.

This works on other ansible.builtin.* commands, such as yum.

fwiw updated ansible-navigator from source this am.

avoid long argument with single dash prefix

Traditionally, we use a single - prefix for the one letter parameters and two - for the long version. e.g -v or --verbose. Ansible already uses one letter and I think it would be better to only expose long arguments. This way we avoid any potential clash in the future.

I faced the problem with: ansible-launcher playbook playbooks/router.yaml -i inventory -e @internet.yaml

The error: ansible-launcher: error: ambiguous option: -e could match -ee, -eei

open with string throws traceback as logger is improperly initialized

steps to reproduce:

  1. ansible-launcher load example_artifact.json
  2. :open $somestring here

result:

Traceback (most recent call last):
  File "/home/gmuniz/Documents/ansible_navigator/ansible-navigator/bin/ansible-launcher", line 33, in <module>
    sys.exit(load_entry_point('ansible-launcher==0.6.0', 'console_scripts', 'ansible-launcher')())
  File "/home/gmuniz/Documents/ansible_navigator/ansible-navigator/lib64/python3.9/site-packages/ansible_launcher/cli.py", line 294, in main
    run(args)
  File "/home/gmuniz/Documents/ansible_navigator/ansible-navigator/lib64/python3.9/site-packages/ansible_launcher/cli.py", line 260, in run
    wrapper(ActionRunner(args=args).run)
  File "/usr/lib64/python3.9/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "/home/gmuniz/Documents/ansible_navigator/ansible-navigator/lib64/python3.9/site-packages/ansible_launcher/action_runner.py", line 51, in run
    self._run_app(interaction)
  File "/home/gmuniz/Documents/ansible_navigator/ansible-navigator/lib64/python3.9/site-packages/ansible_launcher/action_runner.py", line 60, in _run_app
    interaction = run_action(
  File "/home/gmuniz/Documents/ansible_navigator/ansible-navigator/lib64/python3.9/site-packages/ansible_launcher/actions/_actions.py", line 68, in call
    return action_cls(app.args).run(app=app, interaction=interaction)
  File "/home/gmuniz/Documents/ansible_navigator/ansible-navigator/lib64/python3.9/site-packages/ansible_launcher/actions/explore.py", line 309, in run
    self._take_step()
  File "/home/gmuniz/Documents/ansible_navigator/ansible-navigator/lib64/python3.9/site-packages/ansible_launcher/actions/explore.py", line 504, in _take_step
    result = run_action(
  File "/home/gmuniz/Documents/ansible_navigator/ansible-navigator/lib64/python3.9/site-packages/ansible_launcher/actions/_actions.py", line 68, in call
    return action_cls(app.args).run(app=app, interaction=interaction)
  File "/home/gmuniz/Documents/ansible_navigator/ansible-navigator/lib64/python3.9/site-packages/ansible_launcher/actions/open_file.py", line 122, in run
    filename, line_number, obj = self._content(
  File "/home/gmuniz/Documents/ansible_navigator/ansible-navigator/lib64/python3.9/site-packages/ansible_launcher/actions/open_file.py", line 87, in _content
    self._logger("something just a plain string")
TypeError: 'Logger' object is not callable

`:` commands can't be backspaced in some terminals

I've verified this in mate-terminal and Konsole (KDE's terminal), but could not reproduce the issue in xterm.

When typing a :-command like :config, it's not currently possible in some terminals to backspace characters that were typed which seems problematic.

include_role does not make error with `ansible-navigator explore`

playbook that should fail (the role does not exist)

- hosts: all
  gather_facts: true
  tasks:
  - include_role:
      name: brad.foo.ntp

failure with normal ansible-playbook site2.yaml

TASK [include_role : brad.foo.ntp] ***************************************************************************************************************************************************************************
ERROR! the role 'brad.foo.ntp' was not found in /home/student1/ntp_demo/roles:/home/student1/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/home/student1/ntp_demo

The error appears to be in '/home/student1/ntp_demo/site2.yaml': line 5, column 13, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

  - include_role:
      name: brad.foo.ntp
            ^ here

with command ansible-launcher explore site2.yaml -i inventory.yaml

image

zooming in (:0)
image

zooming in (:3)
image

but it says failed in bottom right? very weird

`winston --web` Fails on Fedora 33

$(winston)  winston --web -ll debug
Traceback (most recent call last):
  File "/home/admiller/.virtualenvs/winston/bin/winston", line 8, in <module>
    sys.exit(main())
  File "/home/admiller/.virtualenvs/winston/lib/python3.9/site-packages/winston/cli.py", line 161, in main
    if args.requires_ansible:
AttributeError: 'Namespace' object has no attribute 'requires_ansible'

ansible-navigator inventory -i ../hosts crashes

ProductName: macOS
ProductVersion: 11.2.1
BuildVersion: 20D74

Python 3.9.2
ansible-navigator 0.6.0

../hosts contains:

[kindle]
192.168.123.111

[kindle:vars]
banter="Ok kindle. Let's automate!"
voice="Daniel"

[all:children]
kindle

pressing 1 to see the hosts crashes:
Traceback (most recent call last):
File "/Users/pgriffit/ansible-navigator_demo/venv/bin/ansible-navigator", line 8, in
sys.exit(main())
File "/Users/pgriffit/ansible-navigator_demo/venv/lib/python3.9/site-packages/ansible_navigator/cli.py", line 327, in main
run(args)
File "/Users/pgriffit/ansible-navigator_demo/venv/lib/python3.9/site-packages/ansible_navigator/cli.py", line 293, in run
wrapper(ActionRunner(args=args).run)
File "/usr/local/Cellar/[email protected]/3.9.2_2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/curses/init.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
File "/Users/pgriffit/ansible-navigator_demo/venv/lib/python3.9/site-packages/ansible_navigator/action_runner.py", line 51, in run
self._run_app(interaction)
File "/Users/pgriffit/ansible-navigator_demo/venv/lib/python3.9/site-packages/ansible_navigator/action_runner.py", line 60, in _run_app
interaction = run_action(
File "/Users/pgriffit/ansible-navigator_demo/venv/lib/python3.9/site-packages/ansible_navigator/actions/_actions.py", line 68, in call
return action_cls(app.args).run(app=app, interaction=interaction)
File "/Users/pgriffit/ansible-navigator_demo/venv/lib/python3.9/site-packages/ansible_navigator/actions/inventory.py", line 196, in run
self._take_step()
File "/Users/pgriffit/ansible-navigator_demo/venv/lib/python3.9/site-packages/ansible_navigator/actions/inventory.py", line 244, in _take_step
result = self._interaction.ui.show(
File "/Users/pgriffit/ansible-navigator_demo/venv/lib/python3.9/site-packages/ansible_navigator/ui_framework/ui.py", line 855, in show
result = self._show_menu(obj, columns, await_input)
File "/Users/pgriffit/ansible-navigator_demo/venv/lib/python3.9/site-packages/ansible_navigator/ui_framework/ui.py", line 790, in _show_menu
menu_heading, menu_lines = self._get_heading_menu_items(current, columns, showing_idxs)
File "/Users/pgriffit/ansible-navigator_demo/venv/lib/python3.9/site-packages/ansible_navigator/ui_framework/ui.py", line 750, in _get_heading_menu_items
menu_heading, menu_items = menu_builder.build(
File "/Users/pgriffit/ansible-navigator_demo/venv/lib/python3.9/site-packages/ansible_navigator/ui_framework/menu_builder.py", line 39, in build
return self._menu(dicts, cols, indicies)
File "/Users/pgriffit/ansible-navigator_demo/venv/lib/python3.9/site-packages/ansible_navigator/ui_framework/menu_builder.py", line 56, in _menu
convert_percentage(dicts[idx], cols, self._pbar_width)
File "/Users/pgriffit/ansible-navigator_demo/venv/lib/python3.9/site-packages/ansible_navigator/ui_framework/utils.py", line 23, in convert_percentage
value = dyct[key]
KeyError: 'ansible_network_os'

Also crashes when selecting groups and selecting the first one.

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.