ansiblevarchecker
CLI to check what vars are defined / used to find undefined or extra vars not documented.
Based on source for ansible 2.9 and striped down and modified version of jinja2schema.
Known Issues
- Sub attributes of a dictionary are marked as defined if a different sub attribute is set e.g
# Setting
dict:
sub: yay
# Will cause the use of the following undefined var to be marked as defined
{{ dict.undefined }}
-
Setting variables in jinja2 templates are seen as variable usage and will be marked as undefined if they have not been registered outside of the jinja2 template
-
Because of the removed scalar typing (to fix issues with filter discovery and other edge cases), infer-ing assumes all if statements evaluate to a boolean which can fail when actually run. This is out of scope of what avc is meant to do and is expected behavior (aka, test your code before pushing)
-
Python 3.6.x isn't tested and isn't 100% supported due to https://www.python.org/dev/peps/pep-0538/ being introduced min 3.7. 3.6 can still be configured to work with UTF-8 encoding but this package is not tested against 3.6
-
Tests can fail with
ImportError: cannot import name 'soft_unicode' from 'markupsafe'. To overcome this a downgraded version of markupsafe must be usedpip install MarkupSafe==2.0.1 -
On my local machine
python -mneeds to come before theansiblevarcheckerotherwise aImportError: cannot import name 'main' from 'ansiblevarchecker'occurs
Release files for ansiblevarchecker 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ansiblevarchecker-0.0.2.tar.gz | 24.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ansiblevarchecker-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 53.6 kB
Release files / ansiblevarchecker-0.0.2.tar.gz
| Download URL | ansiblevarchecker-0.0.2.tar.gz |
|---|---|
| Size | 24.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8f6d1b0848df9acee15cc47b5b4ad50822b11bd07ea62379a1937d7dae27b338
|
|
BLAKE2b-256 checksum How to use checksums |
cc64fb1c02986f606a2dc6c118dfcc68e4129bf10e19101545092f233961897f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Release files / ansiblevarchecker-0.0.2-py3-none-any.whl
| Download URL | ansiblevarchecker-0.0.2-py3-none-any.whl |
|---|---|
| Size | 29.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cfe42bd12cb9a295a83ae42338f197fe9d4d8bcf7436513cd1327ba1ecc178dd
|
|
BLAKE2b-256 checksum How to use checksums |
d54ee94af3441ab29750645f5cec09221e06cd1163db34297f722446bb6a6dc4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|