From 305a7a7f671380b9c9f6333ffa1a1cadb29b4fbb Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+sporqist@users.noreply.github.com> Date: Mon, 1 May 2023 15:20:05 +0000 Subject: [PATCH] Backup nach /var/backups --- handlers/backup.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/handlers/backup.yaml b/handlers/backup.yaml index fc68ccf..fd17328 100644 --- a/handlers/backup.yaml +++ b/handlers/backup.yaml @@ -1,3 +1,10 @@ +- name: Ensure backup directory exists + ansible.builtin.file: + path: "/var/backups" + state: directory + owner: root + mode: "755" + - name: Get stats of docker-compose.yaml ansible.builtin.stat: path: /opt/gitea/docker-compose.yaml @@ -20,7 +27,7 @@ - name: Backup Gitea Directory ansible.posix.synchronize: src: /opt/gitea/ - dest: "/opt/gitea.backup@{{ lookup('pipe', 'date --utc --iso-8601=seconds') }}" + dest: "/var/backups/gitea.backup@{{ lookup('pipe', 'date --utc --iso-8601=seconds') }}" recursive: true delegate_to: "{{ inventory_hostname }}" listen: