Simplified and fixed borg role
This commit is contained in:
parent
91b773e12e
commit
cab3d045c1
3 changed files with 17 additions and 41 deletions
|
@ -13,9 +13,9 @@ export BORG_RSH="ssh -i /root/.ssh/borg"
|
|||
{{ job.pre_command }}
|
||||
{% endif %}
|
||||
{% if job.command_to_pipe is defined %}
|
||||
{{ job.command_to_pipe }} | 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} -
|
||||
{% else %}
|
||||
borg create borg@{{ borg_server }}:/srv/borg/repos/{{ ansible_hostname }}::{{ job.name }}-{now} {{ job.path }}
|
||||
borg create {% for exclude in job.exclude|default([]) %} --exclude {{ exclude }}{% endfor %} borg@{{ borg_server }}:/srv/borg/repos/{{ ansible_hostname }}::{{ job.name }}-{now} {{ job.path }}
|
||||
{% endif %}
|
||||
{% if job.post_command is defined %}
|
||||
{{ job.post_command }}
|
||||
|
|
Reference in a new issue