Want to save variable of one role so that can be used again, and not run the compelete ansible again

Hi,

I have a big Ansible with about 10+ roles in it that takes around 1 hr to run completely .
Can some one help me how i can store all variables in a json so that i can trigger a only a failed role…

I am using hostvars[inventory_hostname] but it have a very big json.
I even have set gather_facts:no still getting very larger json.

Please help out in this as it will save a lot of time in development.

thanks

This question is better suited for the project mailing list rather than the devel list. However, I think what you are asking for could be accomplished with fact caching:

https://docs.ansible.com/ansible/latest/plugins/cache.html