Hi!
I use json facts caching and sometimes this files expires (last modified time > than configured fact_caching_timeout).
This is a rare problem, but if it arises - I have non-obvious errors in stdout after running my playbook (like “ansible_fqdn is not defined in host_vars”, etc).
My idea: run some custom assertion code, that should check all cache files for expiration and stop further playbook run if there are some expired cache files with a good understandable message.
How can I embed my custom check code in playbook? Maybe I should write some sort of ansible plugin?
Thanks.