From 1fc2b6d698dc11b2c8d3dfcce1223f721ef8ad4d Mon Sep 17 00:00:00 2001 From: Kuba Orlik Date: Wed, 3 Jun 2026 22:32:29 +0200 Subject: [PATCH] Correct the condition for skipping creation of the bucket --- tasks/main.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 48773c1..a66e879 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -56,11 +56,6 @@ force: yes backup: yes -- debug: - msg: - - "endpoint={{ cloudflare_r2_endpoint }}" - - "path={{ cloudflare_r2_endpoint | urlsplit('path') }}" - - name: "Create a bucket for the backups" amazon.aws.s3_bucket: name: "{{ backup_bucket_prefix }}-{{ inventory_hostname }}" @@ -68,7 +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 + when: (cloudflare_r2_endpoint | urlsplit('path') | default('')) | length < 1 - name: initiate restic repository command: "restic init --password-file=/backup-pwd"