ansible-toolkit
ansible-toolkit copied to clipboard
should suggest pushing inventory variables down to role if higher scope is uneccesary
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.
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.