initial commit
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
commit
75891c3271
129 changed files with 8046 additions and 0 deletions
19
roles/restic/tasks/backend.yml
Normal file
19
roles/restic/tasks/backend.yml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
- name: Ensure restic local repo directory exists
|
||||
file:
|
||||
path: "{{ restic_repo }}"
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0700"
|
||||
when: restic_repo is defined and restic_repo.startswith('/') # only local path
|
||||
|
||||
- name: Ensure restic repo is initialized
|
||||
ansible.builtin.shell: |
|
||||
set -euo pipefail
|
||||
source /etc/restic/restic.env
|
||||
restic snapshots > /dev/null 2>&1 || restic init
|
||||
touch /etc/restic/.initialized
|
||||
args:
|
||||
creates: /etc/restic/.initialized
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue