mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-02 08:43:10 +00:00
Ansible excessively checks the file system for the potential presence of `group_vars` and `host_vars` files. For large numbers of groups this leads to combinatorial performance issues. This commit generates a set of group_vars and host_vars filenames using `os.listdir()` in every possible location and then checks against the sets before making a stat of the file system. Also included in this commit is caching of the base directory lookup for the inventory.