Just to close the thread, i got a response to this question on StackOverflow:
http://stackoverflow.com/questions/41107045/error-refreshing-elasticache-in-ec2-py-when-running-ansible-playbooks On Monday, December 12, 2016 at 1:16:35 PM UTC-5, Abhilash Panickar wrote: > > Hi, > > For the past few days I am getting the following error when running > ansible playbooks using the AWS cloud modules or when directly running the > ec2.py file with the --refresh-cache command from my local machine: > > ap:~ ap$ /ansible/inventory/ec2.py --refresh-cache > Traceback (most recent call last): > File "/ansible/inventory/ec2.py", line 1510, in <module> > Ec2Inventory() > File "/ansible/inventory/ec2.py", line 186, in __init__ > self.do_api_calls_update_cache() > File "/ansible/inventory/ec2.py", line 492, in do_api_calls_update_cache > self.get_elasticache_replication_groups_by_region(region) > File "/ansible/inventory/ec2.py", line 722, in > get_elasticache_replication_groups_by_region > self.add_elasticache_replication_group(replication_group, region) > File "/ansible/inventory/ec2.py", line 1198, in > add_elasticache_replication_group > dest = replication_group['NodeGroups'][0]['PrimaryEndpoint']['Address'] > TypeError: 'NoneType' object has no attribute '__getitem__' > > This issue seems to be go away when running from an Ec2 instance in the > AWS account. > > I have the latest EC2.py and EC2.ini files, ansible version is 2.2.0.0 and > boto3 is installed and I do set the valid AWS credentials before running > the playbook, > > Any ideas on what's going on? > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/abf9fdb7-5d28-4b67-a17e-c56799b160ab%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
