Files
dsk-iac/kubespray/tests/cloud_playbooks/delete-aws.yml
havelight-ee 4c32a7239d update
2023-05-30 14:44:26 +09:00

19 lines
421 B
YAML

---
- hosts: kube_node
become: False
tasks:
- name: Gather EC2 facts
action: ec2_facts
- name: Terminate EC2 instances
ec2:
aws_access_key: "{{ aws_access_key }}"
aws_secret_key: "{{ aws_secret_key }}"
state: absent
instance_ids: "{{ ansible_ec2_instance_id }}"
region: "{{ ansible_ec2_placement_region }}"
wait: True
delegate_to: localhost
connection: local