Fix repo init

This commit is contained in:
Kuba Orlik 2026-06-03 23:26:16 +02:00
parent 1fc2b6d698
commit 73436ca001

View File

@ -74,7 +74,7 @@
failed_when: "command_result.rc!=0 and 'repository master key and config already initialized' not in command_result.stderr"
changed_when: "false"
environment:
RESTIC_REPOSITORY: "s3:{{ cloudflare_r2_endpoint }}/{{ backup_bucket_prefix }}-{{ inventory_hostname }}"
RESTIC_REPOSITORY: "s3:{{ cloudflare_r2_endpoint }}{{ '' if ((cloudflare_r2_endpoint | urlsplit('path') | default('')) | length >1) else '/' ~ backup_bucket_prefix ~ '-' ~ inventory_hostname }}"
AWS_ACCESS_KEY_ID: "{{ cloudflare_r2_access_key }}"
AWS_SECRET_ACCESS_KEY: "{{ cloudflare_r2_secret_key }}"
tags: