From 3d067bf15d159f649bdff0b50e0799586c01b7f2 Mon Sep 17 00:00:00 2001 From: Pratik raj Date: Sun, 6 Dec 2020 08:04:08 +0530 Subject: [PATCH] feat: playbook to delete instance Added ansible playbook to delete linode instance by "instance_label" Signed-off-by: Pratik raj --- delete.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 delete.yml diff --git a/delete.yml b/delete.yml new file mode 100644 index 0000000..6781811 --- /dev/null +++ b/delete.yml @@ -0,0 +1,24 @@ +# +# 2020/12/05 by Pratik Raj +# +# An ansible playbook to Delete linode server by Instance Label +# +# Usage: +# +# export LINODE_API_KEY=4kfjh59shlhdkjhksdj00sdsTTsskklkjoiRPrbDtgHY +# ansible-playbook delete.yml +# +- name: Delete linode server + hosts: localhost + connection: local + gather_facts: false + + vars_files: + - vars/config.yml + + tasks: + - name: Delete your Linode Instance. + linode_v4: + access_token: "{{ token }}" + label: "{{ label }}" + state: absent