From b2041390c1f4f83e4f452e90e3b89bea3c1c5fdd Mon Sep 17 00:00:00 2001 From: Waqar Khan <112862127+waqarsky@users.noreply.github.com> Date: Wed, 14 Dec 2022 12:01:02 +0000 Subject: [PATCH] [FEATURE] adding endpoint option in clean aws (#125) --- clean/tasks/aws.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clean/tasks/aws.yml b/clean/tasks/aws.yml index 5078a43f..fe4e29d5 100644 --- a/clean/tasks/aws.yml +++ b/clean/tasks/aws.yml @@ -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 @@ -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