Skip to content

Instantly share code, notes, and snippets.

@andrewhowdencom
Created October 20, 2016 22:24
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save andrewhowdencom/9bc35cf829ef3f58909b778621097af6 to your computer and use it in GitHub Desktop.
Today I did something stupid and rm -rf'd root. Never again.
---
- 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