Fixed borg cron not working on openbsd
This commit is contained in:
parent
dfc762b005
commit
44ce839172
3 changed files with 7 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
- name: reload openbsd cron
|
||||
- name: restart openbsd cron
|
||||
service:
|
||||
name: cron
|
||||
state: reloaded
|
||||
state: restarted
|
||||
...
|
||||
|
|
|
@ -86,4 +86,5 @@
|
|||
line: '0 23 * * * /usr/local/bin/adyxax_backup.sh'
|
||||
path: /var/cron/tabs/root
|
||||
when: ansible_os_family == 'OpenBSD'
|
||||
notify: restart openbsd cron
|
||||
...
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
# ~~~~ ~~~~ #
|
||||
###############################################################################
|
||||
|
||||
HOME=/root
|
||||
PATH=${PATH}:/usr/local/bin
|
||||
BORG_RSH="ssh -i /root/.ssh/borg"
|
||||
export HOME=/root
|
||||
export PATH=${PATH}:/usr/local/bin
|
||||
export BORG_RSH="ssh -i /root/.ssh/borg"
|
||||
|
||||
{% for job in borg_jobs %}
|
||||
{% if job.command_to_pipe is defined %}
|
||||
{{ job.command_to_pipe }} | BORG_RSH="ssh -i /root/.ssh/borg" borg create borg@{{ borg_server }}:/srv/borg/repos/{{ ansible_hostname }}::{{ job.name }}-{now} {{ job.path | default('-') }}
|
||||
{{ job.command_to_pipe }} | borg create borg@{{ borg_server }}:/srv/borg/repos/{{ ansible_hostname }}::{{ job.name }}-{now} {{ job.path | default('-') }}
|
||||
{% else %}
|
||||
borg create borg@{{ borg_server }}:/srv/borg/repos/{{ ansible_hostname }}::{{ job.name }}-{now} {{ job.path }}
|
||||
{% endif %}
|
||||
|
|
Reference in a new issue