Yeah check out the API chapter of the docs, there's information about all kinds of dynamic inventory scripts.
https://github.com/ansible/ansible/tree/devel/plugins/invent...
Excellent! Thanks for letting me know. I'll have to dive back in and check it out.
https://github.com/ansible-provisioning/ansible-provisioning
http://jpmens.net/2013/06/18/adapting-inventory-for-ansible/
Especially for ec2 there is many modules that allows you to do that too. You can easily specify an inventory file which you populates dynamically.
There is also a lot being done about this in v1.3.
HTH