-
Notifications
You must be signed in to change notification settings - Fork 2
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
clear plugin cache #35
base: main
Are you sure you want to change the base?
Conversation
@crpb thank you for the PR |
ansible.builtin.file: | ||
path: /var/lib/check_km_agent/cache/ | ||
state: absent | ||
when: opn_install_check_mk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the sake of idempotency, the task should only run if we had some changes ...
So the best way to do this to run it as a handler and let the following tasks trigger/notify it:
- copy {{ checkmk_agent_name }} from *
- copy check_mk plugins
- copy check_mk local checks
- copy check_mk additional files
- ... maybe I have overlooked some, so please check it again ...
you can even add a force clean cache
task (debug task that notifies the handler?) triggered by a var/setting that defaults to false
in order to give the user the opportunity to run this in bulk via ansible ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@crpb ... have you consider the triggered solution for the sake of idempotency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as above staited, i somehow missed this here and had enough other things to do :P.
just now i've gone through the docs to get a basic idea. won't happen today but hopefully in the next couple weeks :>.
Delete all cached check results on install to clear any lingering notices which might take a couple hourse for the next run. New problems will also come up within our configured check-time and won't hide in the cache for its TTL. 🙈