From 7b0180b1f08b218a7f7ec3792d5edc7909480d7d Mon Sep 17 00:00:00 2001 From: jogrie <94871105+jogrie@users.noreply.github.com> Date: Sun, 23 Jan 2022 14:08:46 +0100 Subject: [PATCH] fixed backup failure --- tasks/backup.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tasks/backup.yml b/tasks/backup.yml index 93c67f9..a876e9b 100644 --- a/tasks/backup.yml +++ b/tasks/backup.yml @@ -22,11 +22,11 @@ - "{{ gitea_backup_location }}" - name: Backing up gitea before upgrade - ansible.builtin.command: - cmd: "gitea dump -c /etc/gitea/gitea.ini" - chdir: "{{ gitea_backup_location }}" become: true - become_user: "{{ gitea_user }}" + ansible.builtin.command: + cmd: "sudo -u gitea gitea dump -c /etc/gitea/gitea.ini" + chdir: "{{ gitea_backup_location }}" + when: - ansible_facts.services["gitea.service"] is defined - ansible_facts.services["gitea.service"].state == "running"