# Clarity on External Inventory Scripts

**URL:** <https://forum.ansible.com/t/clarity-on-external-inventory-scripts/12836>\
**Category:** Ansible Project\
**Created:** [May 21, 2013, 4:28am UTC](https://forum.ansible.com/t/clarity-on-external-inventory-scripts/12836 "2013-05-21T04:28:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_Mandel](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@Mark\_Mandel](https://forum.ansible.com/u/Mark_Mandel)\
**Post date:** [May 21, 2013, 4:28am UTC](https://forum.ansible.com/t/clarity-on-external-inventory-scripts/12836/1 "2013-05-21T04:28:11Z")

</div>

Hi!

So I have an external inventory script I want to write - no huge dramas there, the output format is documented pretty well here:  
[http://ansible.cc/docs/api.html#external-inventory-scripts](http://ansible.cc/docs/api.html#external-inventory-scripts)

What is confusing me to no end is how I can tell Ansible to actually _use_ my external inventory script.

Can someone point out where that is documented / where there is a demo? I’m totally lost.

Thanks for your time!

Mark

---

<div class="post-metadata">

**Author:** ![Mark\_Mandel](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@Mark\_Mandel](https://forum.ansible.com/u/Mark_Mandel)\
**Post date:** [May 21, 2013, 4:42am UTC](https://forum.ansible.com/t/clarity-on-external-inventory-scripts/12836/2 "2013-05-21T04:42:57Z")

</div>

Aha, Found it here:  
[https://github.com/ansible/ansible/tree/devel/plugins](https://github.com/ansible/ansible/tree/devel/plugins)

_Inventory plugins allow you to store your hosts, groups, and variables in any way_  
_you like. Examples include discovering inventory from EC2 or pulling it from_  
_Cobbler. These could also be used to interface with LDAP or database._

_chmod +x an inventory plugin and either name it /etc/ansible/hosts or use ansible_  
_with -i to designate the path to the plugin._

Mark

---

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [May 22, 2013, 12:14pm UTC](https://forum.ansible.com/t/clarity-on-external-inventory-scripts/12836/3 "2013-05-22T12:14:31Z")

</div>

Several ways, easiest is -i script . In all cases it has to be executable.

Brian Coca
