1
1
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_gitea.git synced 2024-08-16 11:39:50 +02:00

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.
This commit is contained in:
L3D 2022-01-23 18:03:07 +01:00 committed by GitHub
parent 7b0180b1f0
commit 9f55d0eefd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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"