summaryrefslogtreecommitdiffstats
path: root/docs/cli
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-23 05:06:46 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-23 05:06:46 +0000
commit92240acb5cc600eec60624ece9ed4b9ec43b386f (patch)
tree13328d0de4f37030731a96e25749563742fce0cb /docs/cli
parentAdding upstream version 0.14.0. (diff)
downloadanta-92240acb5cc600eec60624ece9ed4b9ec43b386f.tar.xz
anta-92240acb5cc600eec60624ece9ed4b9ec43b386f.zip
Adding upstream version 0.15.0.upstream/0.15.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'docs/cli')
-rw-r--r--docs/cli/inv-from-ansible.md25
-rw-r--r--docs/cli/nrfu.md8
-rw-r--r--docs/cli/overview.md3
3 files changed, 25 insertions, 11 deletions
diff --git a/docs/cli/inv-from-ansible.md b/docs/cli/inv-from-ansible.md
index ebe7da3..b2672e2 100644
--- a/docs/cli/inv-from-ansible.md
+++ b/docs/cli/inv-from-ansible.md
@@ -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
diff --git a/docs/cli/nrfu.md b/docs/cli/nrfu.md
index 7427f62..76605cb 100644
--- a/docs/cli/nrfu.md
+++ b/docs/cli/nrfu.md
@@ -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
```
-[![anta nrfu json results](../imgs/anta-nrfu-tpl-report-output.png){ loading=lazy width="1600" }](../imgs/anta-nrfu-tpl-report-output.png)
+[![anta nrfu tpl_resultss](../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.
+
+[![anta nrfu dry_run](../imgs/anta_nrfu___dry_run.svg){ loading=lazy width="1600" }](../imgs/anta_nrfu___dry_run.svg)
diff --git a/docs/cli/overview.md b/docs/cli/overview.md
index 5e95ff5..107976a 100644
--- a/docs/cli/overview.md
+++ b/docs/cli/overview.md
@@ -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