Replies: 4 comments
-
This sounds like a good addition. This probably should be implemented after the completion of #354 so vars files can also be checked. |
Beta Was this translation helpful? Give feedback.
-
Hello.
The task file and the variable I used are below.
I give the variable "target" as an extra variable by the AWX template and try to add only "somegroup".
I solved this problem by changing the variable's name from "groups" to the another one, but report as an example that should be catched by Ansible-lint. |
Beta Was this translation helpful? Give feedback.
-
I've created a PR for a new rule regarding Variable Naming Standards. Please review if interested. |
Beta Was this translation helpful? Give feedback.
-
@pingiun try with args for reserved name I got:
when running playbooks: In my case it was a variable in defaults/main/vars.yml that was called args |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Issue Type
Ansible and Ansible Lint details
Desired Behaviour
Invalid variable names, e.g. names that contain the
-
character or start with numbers, should be detected and warned about.The ansible documentation shows valid variable and invalid names.
Actual Behaviour
Testing playbook:
ansible-lint
just gives the following output:Ansible itself can give error messages for the first two invalid variables:
and
But
ansible-playbook
gives no error for the last test (reserved name) so it's even more important thatansible-lint
catches it.Beta Was this translation helpful? Give feedback.
All reactions