feat(snapper): Add manual snap script
Can be run before dangerous commands to create a quick backup of the system before running it.
This commit is contained in:
parent
e112bb3078
commit
8301bfb522
2 changed files with 15 additions and 0 deletions
books
7
books/files/snapper-snap-script
Executable file
7
books/files/snapper-snap-script
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
CONFIG="${SNAP_CONFIG:-root}"
|
||||
|
||||
echo RUNNING: snapper --config="$CONFIG" --quiet create --description="${*//sudo /}" --cleanup-algorithm="number"
|
||||
|
||||
"$@"
|
|
@ -188,6 +188,14 @@
|
|||
mode: 0640
|
||||
force: true
|
||||
|
||||
- name: Add snap manual safety command
|
||||
ansible.builtin.copy:
|
||||
src: snapper-snap-script
|
||||
dest: "/usr/bin/snap"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0755
|
||||
|
||||
handlers:
|
||||
# # Do NOT activate the snapperd service -
|
||||
# # on systems without elogind I guess? Unsure
|
||||
|
|
Loading…
Reference in a new issue