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>
12 lines
288 B
YAML
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
|
|
|