kubespray 2.24 추가
This commit is contained in:
19
tests/cloud_playbooks/delete-aws.yml
Normal file
19
tests/cloud_playbooks/delete-aws.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
- name: Terminate AWS VMs
|
||||
hosts: kube_node
|
||||
become: False
|
||||
|
||||
tasks:
|
||||
- name: Gather EC2 facts
|
||||
amazon.aws.ec2_metadata_facts:
|
||||
|
||||
- name: Terminate EC2 instances
|
||||
amazon.aws.ec2_instance:
|
||||
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
|
||||
Reference in New Issue
Block a user