Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(anta.cli)!: Remove confusing -i option in anta get from-ansible #474

Merged
merged 2 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion anta/cli/get/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ def from_cvp(inventory_directory: str, cvp_ip: str, cvp_username: str, cvp_passw
@click.option("--ansible-group", "-g", help="Ansible group to filter", type=str, required=False, default="all")
@click.option(
"--ansible-inventory",
"-i",
default=None,
help="Path to your ansible inventory file to read",
type=click.Path(file_okay=True, dir_okay=False, exists=True, path_type=Path),
Expand Down
14 changes: 6 additions & 8 deletions docs/cli/inv-from-ansible.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@ Usage: anta get from-ansible [OPTIONS]
Build ANTA inventory from an ansible inventory YAML file

Options:
-g, --ansible-group TEXT Ansible group to filter
-i, --ansible-inventory FILE Path to your ansible inventory file to read
-o, --output FILE Path to save inventory file. If not
configured, use anta inventory file
--overwrite Confirm script can overwrite existing
inventory file [env var:
ANTA_GET_FROM_ANSIBLE_OVERWRITE]
--help Show this message and exit.
-g, --ansible-group TEXT Ansible group to filter
--ansible-inventory FILENAME
Path to your ansible inventory file to read
-o, --output FILENAME Path to save inventory file
-d, --inventory-directory PATH Directory to save inventory file
--help Show this message and exit.
```

The output is an inventory where the name of the container is added as a tag for each host:
Expand Down