1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #7472 from atlashealth/ec2_terminate_paused_instances

EC2: stopped instances can also be terminated
This commit is contained in:
James Cammarata 2014-05-21 10:27:10 -05:00
commit 981d56ba55

View file

@ -990,7 +990,7 @@ def terminate_instances(module, ec2, instance_ids):
terminated_instance_ids = []
for res in ec2.get_all_instances(instance_ids):
for inst in res.instances:
if inst.state == 'running':
if inst.state == 'running' or inst.state == 'stopped':
terminated_instance_ids.append(inst.id)
instance_dict_array.append(get_instance_info(inst))
try: