From 40841b3f2ac3ff9a0a6ddeb75b5dcafbc796e5ff Mon Sep 17 00:00:00 2001 From: Kuba Orlik Date: Wed, 3 Jun 2026 22:18:40 +0200 Subject: [PATCH] Create the bucket only if the URL is a generic one. If the url is to a specific bucket, don't create it --- tasks/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/main.yml b/tasks/main.yml index ea7f6a6..f89aeaa 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -63,6 +63,7 @@ endpoint_url: "{{ cloudflare_r2_endpoint }}" access_key: "{{ cloudflare_r2_access_key }}" secret_key: "{{ cloudflare_r2_secret_key }}" + when: (cloudflare_r2_endpoint | urlsplit('path') | default('')) | length > 0 - name: initiate restic repository command: "restic init --password-file=/backup-pwd"