linderhof/roles/restic/tasks/init.yml

10 lines
264 B
YAML
Raw Permalink Normal View History

---
- name: Initialize restic repo (if needed)
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