过去几天,当使用AWS云模块运行ansible playbooks或使用本地计算机上的--refresh-cache命令直接运行ec2.py文件时,我收到以下错误:
gatling:test
从AWS账户中的Ec2实例运行时,这个问题似乎消失了。
我有最新的EC2.py和EC2.ini文件,Ansible版本是2.2.0.0,安装了boto3,我在运行playbook之前设置了有效的AWS凭据。
有关正在发生的事情的任何想法?
答案 0 :(得分:1)
尝试https://github.com/ansible/ansible/pull/20190
处的补丁
@@ -1194,13 +1194,14 @@ def add_elasticache_replication_group(self, replication_group, region):
if not self.all_elasticache_replication_groups and replication_group['Status'] != 'available':
return
+ # Skip clusters we cannot address (e.g. private VPC subnet or clustered redis)
+ if replication_group['NodeGroups'][0]['PrimaryEndpoint'] is None or \
+ replication_group['NodeGroups'][0]['PrimaryEndpoint']['Address'] is None:
+ return
+
# Select the best destination address (PrimaryEndpoint)
dest = replication_group['NodeGroups'][0]['PrimaryEndpoint']['Address']
- if not dest:
- # Skip clusters we cannot address (e.g. private VPC subnet)
- return
-
# Add to index
self.index[dest] = [region, replication_group['ReplicationGroupId']]