This commit is contained in:
alessandrovitali committed 2026-09-03 20:40:11 +02:00
1 parent 39231dce9d
commit 1d415bfae8
2 files changed
+5 -8

No files matched your search

+4 -3
View File
@@ -3,6 +3,7 @@
ansible.builtin.apt:
name: restic
state: present
update_cache: true
- name: Initialize restic repository
environment:
@@ -11,11 +12,11 @@
AWS_ACCESS_KEY_ID: "{{ vault_aws_access_key }}"
AWS_SECRET_ACCESS_KEY: "{{ vault_aws_secret_key }}"
block:
- name: Check if already initialized
ansible.builtin.command: restic snapshots
- name: Check if repository is initialized
command: restic cat config
register: restic_check
failed_when: false
changed_when: false
failed_when: false
- name: Initialize repository
ansible.builtin.command: restic init