Ensure restic gets the correct permissions when it's updated
Yes it's weird to modify the system package like this, but it's very handy. See also https://restic.readthedocs.io/en/stable/080_examples.html#backing-up-your-system-without-running-restic-as-root
This commit is contained in:
@ -58,3 +58,19 @@
|
||||
dest: /etc/logrotate.d/backrest
|
||||
mode: "0600"
|
||||
become: true
|
||||
|
||||
- name: Install pacman post script
|
||||
template:
|
||||
src: files/restic-post.sh
|
||||
dest: /usr/share/libalpm/scripts/restic-post.sh
|
||||
mode: "0700"
|
||||
become: true
|
||||
when: ansible_os_family == 'Archlinux'
|
||||
|
||||
- name: Install pacman post hook
|
||||
template:
|
||||
src: files/restic-post.hook
|
||||
dest: /usr/share/libalpm/hooks/restic-post.hook
|
||||
mode: "0600"
|
||||
become: true
|
||||
when: ansible_os_family == 'Archlinux'
|
||||
|
Reference in New Issue
Block a user