Skip to content

Commit

Permalink
[FEATURE] adding endpoint option in clean aws (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
waqarsky authored Dec 14, 2022
1 parent 92c3d72 commit b204139
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clean/tasks/aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
state: "{{ item.instance_state }}"
termination_protection: "no"
instance_ids: ["{{ item.instance_id }}"]
ec2_url: "{{ cluster_vars.aws_endpoint_url | default(omit) }}"
with_items: "{{ hosts_to_clean | json_query(\"[].{instance_id:instance_id, instance_state: instance_state}\") | default([]) }}"

- name: clean/aws | Delete VMs
Expand All @@ -20,6 +21,7 @@
state: "absent"
instance_ids: "{{ hosts_to_clean | json_query(\"[].instance_id\") }}"
wait: true
ec2_url: "{{ cluster_vars.aws_endpoint_url | default(omit) }}"
when: hosts_to_clean | length


Expand Down

0 comments on commit b204139

Please sign in to comment.