mirror of
https://github.com/Manoj-HV30/cloud-vps.git
synced 2026-07-13 00:50:10 +00:00
fixed structure
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
---
|
||||
# Restic backup setup — installs restic and deploys the backup script
|
||||
- name: Install restic
|
||||
apt:
|
||||
name: restic
|
||||
state: present
|
||||
|
||||
- name: Create secrets directory
|
||||
file:
|
||||
path: /srv/secrets
|
||||
state: directory
|
||||
mode: "0700"
|
||||
|
||||
- name: Deploy backup script
|
||||
template:
|
||||
src: backup.sh.j2
|
||||
dest: /usr/local/bin/backup.sh
|
||||
mode: "0700"
|
||||
|
||||
- name: Setup daily backup cron (3 AM)
|
||||
cron:
|
||||
name: "restic daily backup"
|
||||
hour: "3"
|
||||
minute: "0"
|
||||
job: "/usr/local/bin/backup.sh >> /var/log/backup.log 2>&1"
|
||||
Reference in New Issue
Block a user