Created
March 15, 2014 17:12
-
-
Save shaharke/9570637 to your computer and use it in GitHub Desktop.
Protecting your production EC2 instanced from termination with Ansible
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: all | |
tasks: | |
- name: Gather EC2 facts | |
action: ec2_facts | |
- name: Turning on termination protection | |
local_action: command aws ec2 modify-instance-attribute --region {{ ansible_ec2_placement_region }} --instance-id {{ ansible_ec2_instance_id }} --attribute disableApiTermination --value true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment