From 92240acb5cc600eec60624ece9ed4b9ec43b386f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 23 May 2024 07:06:46 +0200 Subject: Adding upstream version 0.15.0. Signed-off-by: Daniel Baumann --- docs/cli/inv-from-ansible.md | 25 ++++++++++++++++++------- docs/cli/nrfu.md | 8 +++++++- docs/cli/overview.md | 3 --- 3 files changed, 25 insertions(+), 11 deletions(-) (limited to 'docs/cli') 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 -- cgit v1.2.3