custom inventory plugin and facts

I’m wondering if it is possible to gather facts during BaseInventoryPlugin.parse()? I’m working on a dynamic inventory plugin that needs to get custom facts from /etc/ansible/facts.d/ on the remote hosts. It seems to me that it shouldn’t as fact gathering can be disabled. I’ve been digging into ansible source code but haven’t been able to determine if that’s possible.

Also, is there any sort of API documentation beyond the basic “Hello World” examples in https://docs.ansible.com/? Being new to Ansible, it’s difficult to discern what’s Ansible API vs custom functions/methods without digging into the source.

You are correct, an inventory plugin generally should not communicate with the machines at that stage. In any case, there is no built in mechanism to do this.