Merging upstream version 0.15.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
bfebc2a0f4
commit
0a0cb7f4fd
103 changed files with 79620 additions and 742 deletions
|
@ -14,17 +14,28 @@ In large setups, it might be beneficial to construct your inventory based on you
|
|||
$ anta get from-ansible --help
|
||||
Usage: anta get from-ansible [OPTIONS]
|
||||
|
||||
Build ANTA inventory from an ansible inventory YAML file
|
||||
Build ANTA inventory from an ansible inventory YAML file.
|
||||
|
||||
NOTE: This command does not support inline vaulted variables. Make sure to
|
||||
comment them out.
|
||||
|
||||
Options:
|
||||
-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.
|
||||
-o, --output FILE Path to save inventory file [env var:
|
||||
ANTA_INVENTORY; required]
|
||||
--overwrite Do not prompt when overriding current inventory
|
||||
[env var: ANTA_GET_FROM_ANSIBLE_OVERWRITE]
|
||||
-g, --ansible-group TEXT Ansible group to filter
|
||||
--ansible-inventory FILE Path to your ansible inventory file to read
|
||||
[required]
|
||||
--help Show this message and exit.
|
||||
```
|
||||
|
||||
!!! warning
|
||||
|
||||
`anta get from-ansible` does not support inline vaulted variables, comment them out to generate your inventory.
|
||||
If the vaulted variable is necessary to build the inventory (e.g. `ansible_host`), it needs to be unvaulted for `from-ansible` command to work."
|
||||
|
||||
|
||||
The output is an inventory where the name of the container is added as a tag for each host:
|
||||
|
||||
```yaml
|
||||
|
|
|
@ -173,7 +173,7 @@ The `--output` option allows you to choose the path where the final report will
|
|||
```bash
|
||||
anta nrfu --tags LEAF tpl-report --template ./custom_template.j2
|
||||
```
|
||||
[{ loading=lazy width="1600" }](../imgs/anta-nrfu-tpl-report-output.png)
|
||||
[{ loading=lazy width="1600" }](../imgs/anta-nrfu-tpl-report-output.png)
|
||||
|
||||
The template `./custom_template.j2` is a simple Jinja2 template:
|
||||
|
||||
|
@ -200,3 +200,9 @@ cat nrfu-tpl-report.txt
|
|||
* VerifyMlagConfigSanity is [green]SUCCESS[/green] for DC1-LEAF1A
|
||||
* VerifyMlagReloadDelay is [green]SUCCESS[/green] for DC1-LEAF1A
|
||||
```
|
||||
|
||||
## Dry-run mode
|
||||
|
||||
It is possible to run `anta nrfu --dry-run` to execute ANTA up to the point where it should communicate with the network to execute the tests. When using `--dry-run`, all inventory devices are assumed to be online. This can be useful to check how many tests would be run using the catalog and inventory.
|
||||
|
||||
[{ loading=lazy width="1600" }](../imgs/anta_nrfu___dry_run.svg)
|
||||
|
|
|
@ -12,9 +12,6 @@ ANTA can also be used as a Python library, allowing you to build your own tools
|
|||
|
||||
To start using the ANTA CLI, open your terminal and type `anta`.
|
||||
|
||||
!!! warning
|
||||
The ANTA CLI options have changed after version 0.11 and have moved away from the top level `anta` and are now required at their respective commands (e.g. `anta nrfu`). This breaking change occurs after users feedback on making the CLI more intuitive. This change should not affect user experience when using environment variables.
|
||||
|
||||
## Invoking ANTA CLI
|
||||
|
||||
```bash
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue