-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a tag to skip caching for a task #256
Comments
Thank you for your time submitting this request! If what you imply is skipping caching of one task and continue further with the caching process: I don't think this is a good idea because one could get inconsistent results easily or even weird errors which won't make sense. On the other hand, I understand the request and would accept such a pull request with a big fat disclaimer in the docs about the consequences of this behaviour :) |
There are cases where I want to avoid caching a task. This happens if this task is just a "debug" task, which I don't want ansible-bender to spend a lot of time doing caching for the task. And we don't want to cache it also because I want it to be executed for every run for debugging purpose. Another example is "set_fact" or any kinds of tasks that register a variable. I want to avoid caching for these tasks, because if it is cached and skipped, the variable will not be set which is wrong.
Note that this is different than
no-cache
orstop-layering
, which will stop caching for all following tasks.I think the implementation is easy (at least from my experiment). Just add a tag like
SKIP_CACHE_TAG=skip-cache
. And insnapshoter.py
, addinto both
_maybe_load_from_cache
and_snapshot
functions. I can also create the MR. Just want to make sure you are ok with this enhancementThe text was updated successfully, but these errors were encountered: