Is it possible to access ansible facts from a custom fact!?

Hello! I’m writing a custom fact and would like to be able to access information already provided by other ansible facts . . . anyone know if this is possible?

For example, my fact will return a value based on a part of the hostname and whether or not the machine it’s running on is virtual, so i would like to be able to access ansible_virtualization_type, or something similar, from within my fact.

Thanks,

Guy

facts are only information, i'm guessing you mean you have a custom
fact gathering module, modules themselves do not get facts unless you
pass them explicitly as an option. But they can use the shared
module_utils/facts.py to get the same facts as the setup module
gathers.