【发布时间】:2018-09-05 12:59:12
【问题描述】:
我想从 ansible 调整一个 ec2 类型的大小。
这是我的代码:
- name: resize the instance
ec2:
aws_access_key: "{{ aws_access_key_var }}"
aws_secret_key: "{{ aws_secret_key_var }}"
region: "{{ region }}"
instance_ids:
- "{{ instance_id }}"
instance_type: "{\"Value\": \"t2.small\"}"
wait: True
register: ec2_result_file
但我收到此错误:
fatal: [localhost]: FAILED! => {"changed": false, "msg": "image parameter is required for new instance"}
我尝试使用命令行都很好
aws ec2 modify-instance-attribute --region reg --instance-id i-xx --instance-type "{\"Value\": \"t2.small\"}
问候,
【问题讨论】:
标签: amazon-ec2 ansible