diff --git a/roles/borgbackup/files/backup.timer b/roles/borgbackup/files/backup.timer index e69de29..4ce59e0 100644 --- a/roles/borgbackup/files/backup.timer +++ b/roles/borgbackup/files/backup.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Backup dayly + +[Timer] +OnCalendar=daily +Persistent=true + +[Install] +WantedBy=timers.target diff --git a/roles/borgbackup/tasks/main.yml b/roles/borgbackup/tasks/main.yml index 37b6a48..9e43d89 100644 --- a/roles/borgbackup/tasks/main.yml +++ b/roles/borgbackup/tasks/main.yml @@ -9,3 +9,8 @@ src: backup.sh.secret dest: /root/scripts/backup.sh mode: 0700 + +- name: copy backup timer + copy: + src: backup.timer + dest: /etc/systemd/system/