Read borgbase repository dynamically

No need to configure it in host_vars
This commit is contained in:
phil 2023-04-09 10:41:54 +02:00
parent 303b738f99
commit dab13a2388

View file

@ -17,9 +17,13 @@ location:
# Stay in same file system (do not cross mount points). # Stay in same file system (do not cross mount points).
one_file_system: {{ borg_one_file_system }} one_file_system: {{ borg_one_file_system }}
repositories: repositories:
{% if borgbase is define and borgbase %}
- ssh://{{ borgbase_repo.repo_id }}@{{ borgbackup_ssh_host }}/./repo"
{% else %}
{% for repo in borg_repository %} {% for repo in borg_repository %}
- {{ repo.path }} - {{ repo.path }}
{% endfor %} {% endfor %}
{% endif %}
# Store atime into archive. # Store atime into archive.
atime: {{ borgmatic_store_atime }} atime: {{ borgmatic_store_atime }}