# Build Custom Inventory from Active Directory?

**URL:** <https://forum.ansible.com/t/build-custom-inventory-from-active-directory/35095>\
**Category:** AWX Project\
**Created:** [May 2, 2021, 10:54pm UTC](https://forum.ansible.com/t/build-custom-inventory-from-active-directory/35095 "2021-05-02T22:54:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brandon\_Ellis](https://avatars.discourse-cdn.com/v4/letter/b/dec6dc/32.png) [@Brandon\_Ellis](https://forum.ansible.com/u/Brandon_Ellis)\
**Post date:** [May 2, 2021, 10:54pm UTC](https://forum.ansible.com/t/build-custom-inventory-from-active-directory/35095/1 "2021-05-02T22:54:49Z")

</div>

How would I go about building a custom inventory that grabs hosts from AD?

This sounds like something a plugin or inventory script would do, but as of version 17.1 it looks like the support for inventory scripts are gone.

How would I do this?

---

<div class="post-metadata">

**Author:** ![Wei-Yen\_Tan](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/wei-yen_tan/32/4111_2.png) [@Wei-Yen\_Tan](https://forum.ansible.com/u/Wei-Yen_Tan)\
**Post date:** [May 2, 2021, 11:17pm UTC](https://forum.ansible.com/t/build-custom-inventory-from-active-directory/35095/2 "2021-05-02T23:17:57Z")

</div>

I can still see this in the interface in 19. May still need a bit of work.

 ![image.png](https://us1.discourse-cdn.com/ansible/original/2X/a/a2f2bf21ec2909bfd7f9aa922c08906eecefc2ed.png)

I am doing something similar to what you are doing in a previous version of AWX. So I am creating a script to parse through a data source and generating an inventory ini file that can then be imported in as a source.

---

<div class="post-metadata">

**Author:** ![Brandon\_Ellis](https://avatars.discourse-cdn.com/v4/letter/b/dec6dc/32.png) [@Brandon\_Ellis](https://forum.ansible.com/u/Brandon_Ellis)\
**Post date:** [May 4, 2021, 3:12pm UTC](https://forum.ansible.com/t/build-custom-inventory-from-active-directory/35095/3 "2021-05-04T15:12:43Z")

</div>

Yeah, my guess is all of the edit forms seemed to have broken on 17.1, causing my error.

Are you able to share any of the code that you used to do this? Or at the very least could you point me to a source that might help me do so?

---

<div class="post-metadata">

**Author:** ![Brandon\_Ellis](https://avatars.discourse-cdn.com/v4/letter/b/dec6dc/32.png) [@Brandon\_Ellis](https://forum.ansible.com/u/Brandon_Ellis)\
**Post date:** [May 4, 2021, 3:16pm UTC](https://forum.ansible.com/t/build-custom-inventory-from-active-directory/35095/4 "2021-05-04T15:16:15Z")

</div>

(Even though the edit forms are broken on 17.1, I should be able to still make the source using the API)
