how to change instance type in runtime

Viewed 1863

how to change instance type in run time

I have running t2.small instance, I stooped the instance and run it with t2.medium instance but the instance running t2.small

ec2:
 key_name: "{{key_name}}"
 region: "{{aws_region}}"
 state: running
 instance_type: t2.medium
 instance_ids: "{{ item.id }}"
 aws_access_key: "{{aws_access_key_id}}"
 aws_secret_key: "{{aws_secret_access_key}}"

it seems that ansible ignore from the instance_type

2 Answers
Related