Created
October 20, 2016 22:24
Star
You must be signed in to star a gist
Today I did something stupid and rm -rf'd root. Never again.
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
--- | |
- name: "Install tools to prevent the developer hurting themselves" | |
package: | |
name: "{{ item }}" | |
state: "latest" | |
with_items: | |
- "safe-rm" | |
- name: "Replace the normal rm command with safe-rm" | |
alternatives: | |
name: "safe-rm" | |
path: "/usr/bin/safe-rm" | |
link: "/usr/local/rm" | |
- name: "Set a series of files as protected with safe-rm" | |
template: | |
src: "etc/safe-rm.conf.j2" | |
dest: "/etc/safe-rm.conf" | |
owner: "root" | |
group: "root" | |
mode: "0644" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment