ansible-toolkit icon indicating copy to clipboard operation
ansible-toolkit copied to clipboard

should suggest pushing inventory variables down to role if higher scope is uneccesary

Open aioue opened this issue 8 years ago • 1 comments

atk-toolkit should find variables that are only used in a single role variables, and suggest that they are moved down into that role variables directory as they do not need a larger scope.

aioue avatar Sep 17 '15 08:09 aioue

I'm not sure how this would be detected. How do you know if a role that is using the variable is only applied to a single host? Unfortunately, given the dynamic nature of every component used by Ansible (python, jinja, yaml), I don't know that the room for static analysis like this will make sense. But I'm very interested in hearing what you envisioned.

dellis23 avatar Oct 16 '15 21:10 dellis23