c12s-kubespray/tests/cloud_playbooks/delete-aws.yml
2019-04-18 01:42:10 -07:00

17 lines
399 B
YAML

---
- hosts: kube-node
become: False
tasks:
- name: Gather EC2 facts
action: ec2_facts
- name: Terminate EC2 instances
local_action:
module: 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