Clarity on External Inventory Scripts

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

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

Aha, Found it here:
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

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

Brian Coca