summaryrefslogtreecommitdiffstats
path: root/docs/cli/inv-from-ansible.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/cli/inv-from-ansible.md')
-rw-r--r--docs/cli/inv-from-ansible.md25
1 files changed, 18 insertions, 7 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