From 9f55d0eefde918afac00ca7cb65d740da0314952 Mon Sep 17 00:00:00 2001 From: L3D Date: Sun, 23 Jan 2022 18:03:07 +0100 Subject: [PATCH] use variable gitea_user and remove trailing spaces since it is possible to run gitea with an other user defined in the ``{{ gitea_user }}`` variable, I built it in this command. --- tasks/backup.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tasks/backup.yml b/tasks/backup.yml index a876e9b..cc7c290 100644 --- a/tasks/backup.yml +++ b/tasks/backup.yml @@ -24,9 +24,8 @@ - name: Backing up gitea before upgrade become: true ansible.builtin.command: - cmd: "sudo -u gitea gitea dump -c /etc/gitea/gitea.ini" + cmd: "sudo -u {{ gitea_user }} 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"