fix inconsistent logic

This commit is contained in:
Konstantin Gizdov 2021-02-09 01:19:17 +02:00
parent c6bacae87e
commit 0b8bda212c

View File

@ -150,7 +150,7 @@ retention:
{% if borg_prune_prefix is defined %} {% if borg_prune_prefix is defined %}
prefix: '{{ borg_prune_prefix | replace("'", "") }}' prefix: '{{ borg_prune_prefix | replace("'", "") }}'
{% else %} {% else %}
{{ ('No custom archive name format provided.' if borg_archive_name_format is defined) | mandatory('Custom value for borg_archive_name_format was specified without providing the matching prune prefix. Please specify borg_prune_prefix as well.') }} {{ (' # No custom archive name format provided.' if borg_archive_name_format is not defined) | mandatory('Custom value for borg_archive_name_format was specified without providing the matching prune prefix. Please specify borg_prune_prefix as well.') }}
prefix: '{hostname}-' prefix: '{hostname}-'
{% endif %} {% endif %}
@ -182,7 +182,7 @@ consistency:
{% elif borg_prune_prefix is defined %} {% elif borg_prune_prefix is defined %}
prefix: '{{ borg_prune_prefix | replace("'", "") }}' prefix: '{{ borg_prune_prefix | replace("'", "") }}'
{% else %} {% else %}
{{ ('No custom archive name format provided.' if borg_archive_name_format is defined) | mandatory('Custom value for borg_archive_name_format was specified without providing the matching consistency check prefix. Please specify borg_check_prefix as well.') }} {{ (' # No custom archive name format provided.' if borg_archive_name_format is not defined) | mandatory('Custom value for borg_archive_name_format was specified without providing the matching consistency check prefix. Please specify borg_check_prefix as well.') }}
prefix: '{hostname}-' prefix: '{hostname}-'
{% endif %} {% endif %}