Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.