# ec2\_external\_inventory.py - Present(0.6) & Absent (0.7-Dev)

**URL:** <https://forum.ansible.com/t/ec2-external-inventory-py-present-0-6-absent-0-7-dev/11855>\
**Category:** Ansible Project\
**Created:** [September 1, 2012, 8:54am UTC](https://forum.ansible.com/t/ec2-external-inventory-py-present-0-6-absent-0-7-dev/11855 "2012-09-01T08:54:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_harsha](https://avatars.discourse-cdn.com/v4/letter/_/ecae2f/32.png) [@\_harsha](https://forum.ansible.com/u/_harsha)\
**Post date:** [September 1, 2012, 8:54am UTC](https://forum.ansible.com/t/ec2-external-inventory-py-present-0-6-absent-0-7-dev/11855/1 "2012-09-01T08:54:00Z")

</div>

Was just starting to experiment with this but any particular reason ec2\_external\_inventory.py is excluded in the latest dev branch? Also executing ansible with the older example script does not help. Its also detailed in the documentation here - [http://ansible.github.com/api.html#external-inventory](http://ansible.github.com/api.html#external-inventory)

I run into…

Traceback (most recent call last):  
File “./ec2\_external\_inventory.py”, line 376, in   
Ec2Inventory()  
File “./ec2\_external\_inventory.py”, line 131, in **init**  
self.read\_settings()  
File “./ec2\_external\_inventory.py”, line 175, in read\_settings  
configRegions = config.get(‘ec2’, ‘regions’)  
File “/usr/lib/python2.6/ConfigParser.py”, line 532, in get  
raise NoSectionError(section)  
ConfigParser.NoSectionError: No section: ‘ec2’

This is after installing python-argparse on python2.6 (This should probably be included in the install instructions that python\<2.7 does not support argparse - You have to install the module separately).

---

<div class="post-metadata">

**Author:** ![\_harsha](https://avatars.discourse-cdn.com/v4/letter/_/ecae2f/32.png) [@\_harsha](https://forum.ansible.com/u/_harsha)\
**Post date:** [September 1, 2012, 8:55am UTC](https://forum.ansible.com/t/ec2-external-inventory-py-present-0-6-absent-0-7-dev/11855/2 "2012-09-01T08:55:27Z")

</div>

Just want to add that I come from a Debian shop where the default python deb version is 2.6.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [September 1, 2012, 11:50am UTC](https://forum.ansible.com/t/ec2-external-inventory-py-present-0-6-absent-0-7-dev/11855/3 "2012-09-01T11:50:51Z")

</div>

Oh there's a reason fro everything 🙂

All ansible-plugins are here:

&nbsp;&nbsp;&nbsp;&nbsp;[https://github.com/ansible/ansible-plugins](https://github.com/ansible/ansible-plugins)

And specifically what you want is:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[https://github.com/ansible/ansible-plugins/tree/master/inventory](https://github.com/ansible/ansible-plugins/tree/master/inventory)

There's various reasons for this -- (A) they are optional, (B) it  
showcases the larger theme of extending ansible with connection,  
callback, and inventory plugins, (C) it allows us to update those  
independent of an ansible release.

I would agree that using argparse is less than optimal for 2.6 users  
and it would be nice if someone submitted a batch for it to use  
ConfigParser instead. I suspect that should be a pretty trivial  
patch, so send it a long and I'll gladly take it.

(Ansible itself uses ConfigParser everywhere else)

--Michael
