# custom inventory plugin and facts

**URL:** <https://forum.ansible.com/t/custom-inventory-plugin-and-facts/32761>\
**Category:** Ansible Developer\
**Created:** [April 22, 2020, 5:51pm UTC](https://forum.ansible.com/t/custom-inventory-plugin-and-facts/32761 "2020-04-22T17:51:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tdev\_Feeds](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@Tdev\_Feeds](https://forum.ansible.com/u/Tdev_Feeds)\
**Post date:** [April 22, 2020, 5:51pm UTC](https://forum.ansible.com/t/custom-inventory-plugin-and-facts/32761/1 "2020-04-22T17:51:11Z")

</div>

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/](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.

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [April 22, 2020, 6:09pm UTC](https://forum.ansible.com/t/custom-inventory-plugin-and-facts/32761/2 "2020-04-22T18:09:58Z")

</div>

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.
