set_fact and fact caching

Hi,

I'm implementing Ansible on a legacy infrastructure and would like to
use it first to assess the damage (i.e. run in check mode).

There is some information that I've to gather by running commands,
because it doesn't exist as facts, and later I use set_fact to define
facts that will be used by other tasks in calculating things.

Since the command module doesn't run in check mode, I was wondering if
I could first run a playbook to gather the facts (both automatically by
Ansible and through my command/set_fact tasks) and use fact caching to
later use these facts in another playbook run.

I tried it and it works fine for Ansible facts (with Redis), but not
for the facts I created with set_fact. Just wanted to check if that's
expected, if there is a better way to do this and, finally, if anyone
is interested in having this functionality (if it doesn't exist)?

There reason I'm doing all of this is to first show management how much
entropy the legacy environment has, what would be changed if we start
to conform to our standards, risks, etc.

Thanks,
Giovanni

It looks like a better way is to create a module in library/ that
outputs custom facts in JSON format. Then fact caching works fine.

Giovanni