我正在尝试使用云模块ec2_asg创建AWS EC2 Auto-Scaling组。
我有一个正在创建安全组,弹性负载均衡器,启动配置,标记资产等的剧本。一切正常。当我尝试创建一个新的ASG时,我遇到了失败。下面是playbook代码,然后是模块失败的-vvv输出。我正在运行ansible 2.2.1.0 非常感谢任何有关故障排除的帮助
#setup Logstash Autoscaling group
- name: ELkstack LogStash ASG
ec2_asg:
name: "pro-ELK-LogStash-ASG"
launch_config_name: "test-test-asg"
health_check_period: 300
health_check_type: EC2
replace_all_instances: yes
replace_batch_size: 1
min_size: 1
max_size: 4
desired_capacity: 1
region: us-east-1
-vvv错误输出
An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
File "/var/folders/08/x2n75q_925l5xc9hfjc1gz9c0000gn/T/ansible_38fX0z/ansible_module_ec2_asg.py", line 875, in <module>
main()
File "/var/folders/08/x2n75q_925l5xc9hfjc1gz9c0000gn/T/ansible_38fX0z/ansible_module_ec2_asg.py", line 864, in main
create_changed, asg_properties=create_autoscaling_group(connection, module)
File "/var/folders/08/x2n75q_925l5xc9hfjc1gz9c0000gn/T/ansible_38fX0z/ansible_module_ec2_asg.py", line 437, in create_autoscaling_group
launch_config=launch_configs[0],
IndexError: list index out of range
fatal: [localhost]: FAILED! => {
"changed": false,
"failed": true,
"invocation": {
"module_name": "ec2_asg"
},
"module_stderr": "Traceback (most recent call last):\n File \"/var/folders/08/x2n75q_925l5xc9hfjc1gz9c0000gn/T/ansible_38fX0z/ansible_module_ec2_asg.py\", line 875, in <module>\n main()\n File \"/var/folders/08/x2n75q_925l5xc9hfjc1gz9c0000gn/T/ansible_38fX0z/ansible_module_ec2_asg.py\", line 864, in main\n create_changed, asg_properties=create_autoscaling_group(connection, module)\n File \"/var/folders/08/x2n75q_925l5xc9hfjc1gz9c0000gn/T/ansible_38fX0z/ansible_module_ec2_asg.py\", line 437, in create_autoscaling_group\n launch_config=launch_configs[0],\nIndexError: list index out of range\n",
"module_stdout": "",
"msg": "MODULE FAILURE"
}
答案 0 :(得分:0)
这是一个间距问题,感到愚蠢,但想要发布以关闭它,以防万一其他人遇到这个。