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