1 Commits
Author SHA1 Message Date
alessandrovitali 1d415bfae8 fix 2026-09-03 20:40:11 +02:00
2 changed files with 5 additions and 8 deletions

No files matched your search

+4 -3
View File
@@ -3,6 +3,7 @@
ansible.builtin.apt: ansible.builtin.apt:
name: restic name: restic
state: present state: present
update_cache: true
- name: Initialize restic repository - name: Initialize restic repository
environment: environment:
@@ -11,11 +12,11 @@
AWS_ACCESS_KEY_ID: "{{ vault_aws_access_key }}" AWS_ACCESS_KEY_ID: "{{ vault_aws_access_key }}"
AWS_SECRET_ACCESS_KEY: "{{ vault_aws_secret_key }}" AWS_SECRET_ACCESS_KEY: "{{ vault_aws_secret_key }}"
block: block:
- name: Check if already initialized - name: Check if repository is initialized
ansible.builtin.command: restic snapshots command: restic cat config
register: restic_check register: restic_check
failed_when: false
changed_when: false changed_when: false
failed_when: false
- name: Initialize repository - name: Initialize repository
ansible.builtin.command: restic init ansible.builtin.command: restic init
+1 -5
View File
@@ -3,11 +3,7 @@
set -e set -e
# Source environment variables if running manually/outside Systemd ## Environment is injected by the systemd unit via EnvironmentFile=/etc/restic-backup.env. Run manually with: systemctl start restic-backup.service
if [ -f /etc/restic-backup.env ]; then
# shellcheck source=/dev/null
. /etc/restic-backup.env
fi
echo "Starting Restic Backup at $(date)" echo "Starting Restic Backup at $(date)"