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:
parent
99c9f19403
commit
c3dcb95c10
2 changed files with 9 additions and 5 deletions
|
@ -48,16 +48,20 @@ set -euxo pipefail
|
||||||
--prune {% endif %}
|
--prune {% endif %}
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{% macro validate_mounts %}
|
{% if restic_archiver__mount_required %}
|
||||||
{% if restic_archiver__mount_required | bool %}
|
{% raw %}
|
||||||
if mountpoint -q {{ restic_archiver__mount_disk }}
|
if mountpoint -q {{ restic_archiver__mount_disk }}
|
||||||
then
|
then
|
||||||
echo "{{ restic_archiver__mount_disk }} is mounted"
|
echo "{{ restic_archiver__mount_disk }} is mounted"
|
||||||
else
|
else
|
||||||
mount -a
|
mount -a
|
||||||
fi
|
fi
|
||||||
{% endif %}
|
{% endraw %}
|
||||||
|
{% else %}
|
||||||
|
{% macro validate_mounts() %}
|
||||||
|
# be excellent to each other!
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
# Settings for Server {{ repo['name'] | string }}
|
# Settings for Server {{ repo['name'] | string }}
|
||||||
{{ validate_mounts }}
|
{{ validate_mounts }}
|
||||||
|
@ -112,4 +116,4 @@ restic check
|
||||||
sync
|
sync
|
||||||
{% if restic_archiver__umount_after_usage %}
|
{% if restic_archiver__umount_after_usage %}
|
||||||
umount restic_archiver__mount_disk
|
umount restic_archiver__mount_disk
|
||||||
{% restic_archiver__mount_disk %}
|
{% endif %}
|
||||||
|
|
|
@ -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'
|
playbook_version_path: 'role-restic_archiver_roles-ansible_github.com.version'
|
||||||
|
|
Loading…
Reference in a new issue