A tool for efficiently exploring the hosts, groups and variables in an Ansible inventory
Project description
Inventory Explorer
Inventory Explorer helps you efficiently explore the hosts, groups and variables in an Ansible inventory.
Features:
- Fuzzy search hosts and groups (using fzf)
- Quickly see what groups a host is in
- Quickly see what hosts are in a group
- Quickly jump between related hosts and groups
- Display and fuzzy search YAML group and host data
- Quickly edit host or group variables
- See fully evaluated variables (e.g. with all template substitutions applied)
Warning: Experimental
This project is currently in an experimental/exploratory phase to try and understand how an Inventory exploring tool might function and be used. It may change radically or become abandoned depending on feedback.
Installation
Install from PyPI using pip:
$ pip install inventory-explorer
Usage
$ inventory-explorer
Or
$ inventory-explorer -i path/to/inventory
Follow the prompts! Press ctrl+C to exit, or return to earlier parts of the UI. You may need to press this multiple times to exit.
Inventory aliases
In some cases it can be helpful to define short-forms for the full path(s) to a given inventory which you frequently use.
On startup, inventory-explorer tries to read the file
inventory-explorer-aliases.yml from the working directory. This should be a
YAML file with values in one of the three forms demonstrated below:
simple: path/to/some/simple/inventory.py
several:
- paths/to/one/inventory.py
- paths/to/another/inventory.ini
vars_too:
inventory_files:
- path/to/an/inventory.yml
extra_vars:
- foo=bar
- @path/to/vars.yml
--inventory simple becomes a shorthand for --inventory path/to/some/simple/inventory.py.
--inventory several becomes a shorthand for --inventory paths/to/one/inventory.py --inventory paths/to/another/inventory.ini.
--inventory vars_too becomes a shorthand for --inventory path/to/an/inventory.py --extra-vars foo=bar --extra-vars @path/to/vars.yml.
As with the --extra-vars argument, inventory-explorer extends the Ansible
syntax for extra variables by supporting shell-style glob patterns in
filenames.
Development
You can run the test suite using:
$ pip install -r requirements-test.txt
$ pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file inventory_explorer-0.0.1.tar.gz.
File metadata
- Download URL: inventory_explorer-0.0.1.tar.gz
- Upload date:
- Size: 25.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d1d4b36da58f6a77b5f3b4dbb0adc477a403117c8dc605c9056ccde1c5907a8
|
|
| MD5 |
7fb5f0b8c4659e402f8571a4bd8240f8
|
|
| BLAKE2b-256 |
54359cd6d0308b8296c599cef2b19c44d14a6432bdeffa61798e98bcd964d439
|
Provenance
The following attestation bundles were made for inventory_explorer-0.0.1.tar.gz:
Publisher:
release.yml on bbc/inventory_explorer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
inventory_explorer-0.0.1.tar.gz -
Subject digest:
8d1d4b36da58f6a77b5f3b4dbb0adc477a403117c8dc605c9056ccde1c5907a8 - Sigstore transparency entry: 319409923
- Sigstore integration time:
-
Permalink:
bbc/inventory_explorer@8859901a05a255f081fc178710871cd6ff1cfc7a -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/bbc
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8859901a05a255f081fc178710871cd6ff1cfc7a -
Trigger Event:
release
-
Statement type:
File details
Details for the file inventory_explorer-0.0.1-py3-none-any.whl.
File metadata
- Download URL: inventory_explorer-0.0.1-py3-none-any.whl
- Upload date:
- Size: 22.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c1083565ade8166a2460c6e68bec7d9de9eb0e50e30d169a0a783bf902c063c
|
|
| MD5 |
c787e1b723b683ffb4dca28271e262a5
|
|
| BLAKE2b-256 |
0e925592a2cbefbe13e83a897465a7c90031abc91f643002028d6189e56a80db
|
Provenance
The following attestation bundles were made for inventory_explorer-0.0.1-py3-none-any.whl:
Publisher:
release.yml on bbc/inventory_explorer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
inventory_explorer-0.0.1-py3-none-any.whl -
Subject digest:
1c1083565ade8166a2460c6e68bec7d9de9eb0e50e30d169a0a783bf902c063c - Sigstore transparency entry: 319409950
- Sigstore integration time:
-
Permalink:
bbc/inventory_explorer@8859901a05a255f081fc178710871cd6ff1cfc7a -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/bbc
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8859901a05a255f081fc178710871cd6ff1cfc7a -
Trigger Event:
release
-
Statement type: