You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
397 B

  1. ---
  2. - hosts: kube-node
  3. sudo: False
  4. tasks:
  5. - name: Gather EC2 facts
  6. action: ec2_facts
  7. - name: Terminate EC2 instances
  8. local_action:
  9. module: ec2
  10. aws_access_key: "{{ aws_access_key }}"
  11. aws_secret_key: "{{ aws_secret_key }}"
  12. state: absent
  13. instance_ids: "{{ ansible_ec2_instance_id }}"
  14. region: "{{ ansible_ec2_placement_region }}"
  15. wait: True