linderhof/roles/restic/tasks/backend.yml
Matthias Johnson 796428cbda Extract restic repo init to shared task file
Deduplicate nearly identical init logic from backend.yml and
backend_sftp.yml into init.yml. Also fixes missing set -euo pipefail
in the sftp backend variant.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 21:24:45 -07:00

12 lines
288 B
YAML

---
- 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
- ansible.builtin.include_tasks: init.yml