ec2_external_inventory.py - Present(0.6) & Absent (0.7-Dev)

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

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).

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

Oh there's a reason fro everything :slight_smile:

All ansible-plugins are here:

    https://github.com/ansible/ansible-plugins

And specifically what you want is:

     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