ansible/files/copr/provision/terminatepb.yml

16 lines
326 B
YAML

---
- name: terminate instance
hosts: all
user: root
gather_facts: False
tasks:
- name: find the instance id from the
action: command curl -s http://169.254.169.254/latest/meta-data/instance-id
register: instanceid
- name: terminate it
local_action: euca-terminate-instances ${instanceid.stdout}