1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_restic_archiver.git synced 2024-08-16 10:09:49 +02:00

update restic jinja2

This commit is contained in:
L3D 2020-12-14 12:39:11 +01:00 committed by Lilian Roller
parent 99c9f19403
commit c3dcb95c10
No known key found for this signature in database
GPG key ID: 5215C3441797AB2B
2 changed files with 9 additions and 5 deletions

View file

@ -48,16 +48,20 @@ set -euxo pipefail
--prune {% endif %}
{%- endmacro %}
{% macro validate_mounts %}
{% if restic_archiver__mount_required | bool %}
{% if restic_archiver__mount_required %}
{% raw %}
if mountpoint -q {{ restic_archiver__mount_disk }}
then
echo "{{ restic_archiver__mount_disk }} is mounted"
else
mount -a
fi
{% endif %}
{% endraw %}
{% else %}
{% macro validate_mounts() %}
# be excellent to each other!
{% endmacro %}
{% endif %}
# Settings for Server {{ repo['name'] | string }}
{{ validate_mounts }}
@ -112,4 +116,4 @@ restic check
sync
{% if restic_archiver__umount_after_usage %}
umount restic_archiver__mount_disk
{% restic_archiver__mount_disk %}
{% endif %}

View file

@ -1,3 +1,3 @@
---
playbook_version_number: 25 # should be over ninethousand
playbook_version_number: 26 # should be over ninethousand
playbook_version_path: 'role-restic_archiver_roles-ansible_github.com.version'