AWX installed on AWS- ERROR with aws inventory.

,

2017-12-12 22:45:08,761 INFO awx.main.commands.inventory_import Updating inventory 3: AWS HorizontalDev 2017-12-12 22:45:08,776 DEBUG awx.main.commands.inventory_import Using system install of ansible-inventory CLI: /usr/bin/ansible-inventory 2017-12-12 22:45:08,776 INFO awx.main.commands.inventory_import Reading Ansible inventory source: /usr/lib/python2.7/site-packages/awx/plugins/inventory/ec2.py 2017-12-12 22:45:35,201 ERROR awx.main.commands.inventory_import [WARNING]: Could not match supplied host pattern, ignoring: all 2017-12-12 22:45:35,201 ERROR awx.main.commands.inventory_import 2017-12-12 22:45:35,202 INFO awx.main.commands.inventory_import Processing JSON output… 2017-12-12 22:45:35,202 DEBUG awx.main.commands.inventory_import Loaded group: all 2017-12-12 22:45:35,202 DEBUG awx.main.commands.inventory_import Finished loading from source: /usr/lib/python2.7/site-packages/awx/plugins/inventory/ec2.py 2017-12-12 22:45:35,202 INFO awx.main.commands.inventory_import Loaded 0 groups, 0 hosts 2017-12-12 22:45:35,213 INFO awx.main.commands.inventory_import Inventory variables unmodified 2017-12-12 22:45:35,220 DEBUG awx.main.models.inventory Going to update inventory computed fields 2017-12-12 22:45:35,284 DEBUG awx.main.models.inventory Finished updating inventory computed fields 2017-12-12 22:45:35,284 INFO awx.main.commands.inventory_import Inventory import completed for AWS in 26.6s

Ec2 filters provided are not being used by AWX. Its almost a week, trying to get it run. Please share your thoughts

How have you set up your inventory source?

Yes, I have IAM user ACCESS & secret key, using amazon EC@ as source. Pls refer the PIC too

(attachments)

I would verify that credential can see the hosts you expect to be there.

Yes, I have inventory source setup done. refer pic too

(attachments)

I have access to ec2, Autoscalling ,S3 etc except for elastic search. So thats the issue then, I thought I shd be able to see ec2 insatnce as I tried adding tag filter too

I am now using IAM role attached to the ec2 where AWX is running. When I run docker exec 0de4d8a3f2a2 python2 /usr/lib/python2.7/site-packages/awx/plugins/inventory/ec2.py
in the awx_task container. I am getting all the data related to RDS and cache in format:
{
“Multiple”: [
//xxxxx.y9ryfm.cfg.use1.cache.amazonaws.com

],

“_meta”: {
“hostvars”: {


so on, all details on RDS.

When I try through the WEBUI, I get :
2017-12-13 20:10:01,187 INFO awx.main.commands.inventory_import Updating inventory 3: AWS HorizontalDev 2017-12-13 20:10:01,203 DEBUG awx.main.commands.inventory_import Using system install of ansible-inventory CLI: /usr/bin/ansible-inventory 2017-12-13 20:10:01,203 INFO awx.main.commands.inventory_import Reading Ansible inventory source: /usr/lib/python2.7/site-packages/awx/plugins/inventory/ec2.py 2017-12-13 20:10:02,912 ERROR awx.main.commands.inventory_import [WARNING]: Could not match supplied host pattern, ignoring: all 2017-12-13 20:10:02,913 ERROR awx.main.commands.inventory_import 2017-12-13 20:10:02,913 INFO awx.main.commands.inventory_import Processing JSON output… 2017-12-13 20:10:02,913 DEBUG awx.main.commands.inventory_import Loaded group: all 2017-12-13 20:10:02,913 DEBUG awx.main.commands.inventory_import Finished loading from source: /usr/lib/python2.7/site-packages/awx/plugins/inventory/ec2.py 2017-12-13 20:10:02,913 INFO awx.main.commands.inventory_import Loaded 0 groups, 0 hosts 2017-12-13 20:10:02,923 INFO awx.main.commands.inventory_import Inventory variables unmodified 2017-12-13 20:10:02,929 DEBUG awx.main.models.inventory Going to update inventory computed fields 2017-12-13 20:10:02,991 DEBUG awx.main.models.inventory Finished updating inventory computed fields 2017-12-13 20:10:02,991 INFO awx.main.commands.inventory_import Inventory import completed for AWS in 1.8s

In Inventory , I have configured only source now and not groups & hosts.

Can you pls tell me what am I missing?

thanks for your support:)

(attachments)

there is no ec2.ini in /usr/lib/python2.7/site-packages/awx/plugins/inventory/ where ec2.py is called in the awx_task container. I added there manually to run ec2.py script from docker thru cli as it was giving this error in absence of ec2.ini:

Traceback (most recent call last):
File “/usr/lib/python2.7/site-packages/awx/plugins/inventory/ec2.py”, line 1573, in
Ec2Inventory()
File “/usr/lib/python2.7/site-packages/awx/plugins/inventory/ec2.py”, line 180, in init
self.read_settings()
File “/usr/lib/python2.7/site-packages/awx/plugins/inventory/ec2.py”, line 251, in read_settings
configRegions = config.get(‘ec2’, ‘regions’)
File “/usr/lib64/python2.7/ConfigParser.py”, line 607, in get
raise NoSectionError(section)
ConfigParser.NoSectionError: No section: ‘ec2’