From d8a29adb5633c7c031198251a97356f3cf22ffdd Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+sporqist@users.noreply.github.com> Date: Sun, 30 Apr 2023 23:56:59 +0000 Subject: [PATCH] Behalte File-Ownership beim kopieren --- handlers/backup.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/handlers/backup.yaml b/handlers/backup.yaml index 31a6a52..d0ea999 100644 --- a/handlers/backup.yaml +++ b/handlers/backup.yaml @@ -10,12 +10,11 @@ - Ensure Gitea is running - name: Backup Gitea Directory - ansible.builtin.copy: + ansible.builtin.synchronize: src: /opt/gitea/ dest: "/opt/gitea.backup@{{ lookup('pipe', 'date --utc --iso-8601=seconds') }}" - mode: preserve - remote_src: true - directory_mode: true + recursive: true + delegate_to: "{{ inventory_hostname }}" listen: - Backup Gitea register: backup