# Active Directory as a dynamic inventory

**URL:** <https://forum.ansible.com/t/active-directory-as-a-dynamic-inventory/36554>\
**Category:** Ansible Project\
**Created:** [April 21, 2022, 9:23pm UTC](https://forum.ansible.com/t/active-directory-as-a-dynamic-inventory/36554 "2022-04-21T21:23:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Julien\_Deloubes](https://avatars.discourse-cdn.com/v4/letter/j/edb3f5/32.png) [@Julien\_Deloubes](https://forum.ansible.com/u/Julien_Deloubes)\
**Post date:** [April 21, 2022, 9:23pm UTC](https://forum.ansible.com/t/active-directory-as-a-dynamic-inventory/36554/1 "2022-04-21T21:23:31Z")

</div>

Hello,  
i think using AD as a dynamic inventory is a good option.  
Sometimes CMDB is not up to date and has a few or no API to use to retrieve a list of hosts.  
If you strictly join all your hosts to your AD then it can be a weapon of choice for a dynamic inventory.  
If retrieving hosts from AD with an inventory script seems easy, how do you “organize” your hosts in groups or such ? In differents OU? Can you add some sort of tags in AD objects ?  
Ideas welcome!  
Thanks!
