mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-01-11 10:00:03 -03:30
* project: fix ansible-lint name Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: ignore jinja template error in names Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: capitalize ansible name Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: update notify after name capitalization Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> --------- Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>
20 lines
480 B
YAML
20 lines
480 B
YAML
---
|
|
- 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
|