Fix cronjob for backups
This commit is contained in:
parent
838f959fd9
commit
3054836085
@ -38,11 +38,27 @@
|
|||||||
group: root
|
group: root
|
||||||
mode: '0700'
|
mode: '0700'
|
||||||
|
|
||||||
|
- name: "Setup paths for backup cron file"
|
||||||
|
ansible.builtin.cron:
|
||||||
|
cron_file: 'ansible_restic_backup'
|
||||||
|
user: 'root'
|
||||||
|
env: true
|
||||||
|
name: 'PATH'
|
||||||
|
job: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin'
|
||||||
|
|
||||||
|
- name: "Setup mail for backup cron file"
|
||||||
|
ansible.builtin.cron:
|
||||||
|
cron_file: 'ansible_restic_backup'
|
||||||
|
user: 'root'
|
||||||
|
env: true
|
||||||
|
name: 'MAILTO'
|
||||||
|
job: ''
|
||||||
|
|
||||||
- name: "Creates a cron file for backups under /etc/cron.d"
|
- name: "Creates a cron file for backups under /etc/cron.d"
|
||||||
ansible.builtin.cron:
|
ansible.builtin.cron:
|
||||||
name: restic backup
|
name: 'restic backup'
|
||||||
minute: "0"
|
minute: '0'
|
||||||
hour: "0"
|
hour: '1'
|
||||||
user: "root"
|
job: '/usr/local/bin/restic-backup.sh 2>&1 | logger -t backup'
|
||||||
job: "systemd-cat {{ bin_prefix }}/restic-backup.sh"
|
cron_file: 'ansible_restic_backup'
|
||||||
cron_file: ansible_restic_backup
|
user: 'root'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user