ansible with AWS inventory (ec2.py) returns rds, etc

Hello,
Running the ec2.py inventory script as follows

ec2.py --list

I have a filter for instance type based on app name=‘xyx’.

This should return only sepecific app-servers which I am restricing in the call.
But it returning all hosts in the group including the rds instance names.
Filter in ec2.ini is not working either. Is there any debug option available to troubleshoot the same issue?

thanks
dnraj

Hi Raj,

There is an option in ec2.ini to exclude RDS instances:

https://github.com/ansible/ansible/blob/a87d8891826246cceb15961cfbbd6a2c728afb52/plugins/inventory/ec2.ini#L44-L45

I hope this is helpful.
-Baraa

Thanks Baraa.
I wrote a custom AWS shell script to create an inventory file for my needs.

https://github.com/dnraj/ec2scripts/blob/master/scripts/generate_ansible_aws_inventory.sh