Ansible EC2_ASG模块故障



我正在尝试使用云模块ec2_asg创建 AWS EC2 自动扩展组。

我有一个行动手册,用于创建安全组、弹性负载均衡器、启动配置、标记资产等。 一切都在正常。 当我尝试创建新的 ASG 时,我遇到了失败。 下面是剧本代码,然后是模块故障的 -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 mainn    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_groupn    launch_config=launch_configs[0],nIndexError: list index out of rangen",
"module_stdout": "",
"msg": "MODULE FAILURE"
}

这是一个间距问题,感觉很愚蠢,但想发布以关闭它,以防其他人遇到这种情况。

最新更新