Make CACHE_DIR configurable (CI use case) #3160
-
Currently CACHE_DIR does not seem to be configurable but defaults to either XDG_CACHE_HOME or ~/.cache according to ansible-lint/src/ansiblelint/config.py Line 26 in b9d96df In some CI systems it is beneficial to cache the cache to prevent collections from being installed over and over again. Gitlab for example only allows caching from the project directory so you need to adjust XDG_CACHE_HOME to get the cache somewhere else. As this is not documented (to my knowledge) this might be subject to a change and my "workaround" using XDG_CACHE_HOME fails. Suggestion: Introduce a parameter, environment variable, configuration file option to make the path configurable instead of XDG_CACHE_HOME. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I hope you will not be totally be disappointed by a "nope" answer. I think you should take this with Gitlab folks as that behavior might break caching of most tools. I am just trying to prevent adding extra complexity. XDG_CACHE_HOME is a standard-enough option IMHO, could be even set just for command calling the linter. |
Beta Was this translation helpful? Give feedback.
I hope you will not be totally be disappointed by a "nope" answer. I think you should take this with Gitlab folks as that behavior might break caching of most tools. I am just trying to prevent adding extra complexity.
XDG_CACHE_HOME is a standard-enough option IMHO, could be even set just for command calling the linter.