Skip to content

Commit d67a78d

Browse files
jtomaszewskikrisdante
authored andcommittedNov 26, 2020
Fix terminate instances task in aws-remove-all playbook if there are no ec2 instances
1 parent 27bfcfc commit d67a78d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

‎site.maintenance.aws-remove-all.yml

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
set_fact:
4646
_aws_ec2_to_remove: "{{ _aws_ec2|json_query('instances[].instance_id')}}"
4747
- name: Terminate instances
48+
when: _aws_ec2_to_remove | length > 0
4849
ec2:
4950
instance_ids: "{{ _aws_ec2_to_remove }}"
5051
region: "{{ aws_region }}"

0 commit comments

Comments
 (0)
Please sign in to comment.