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:
parent
7b0180b1f0
commit
9f55d0eefd
1 changed files with 1 additions and 2 deletions
|
@ -24,9 +24,8 @@
|
||||||
- name: Backing up gitea before upgrade
|
- name: Backing up gitea before upgrade
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.command:
|
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 }}"
|
chdir: "{{ gitea_backup_location }}"
|
||||||
|
|
||||||
when:
|
when:
|
||||||
- ansible_facts.services["gitea.service"] is defined
|
- ansible_facts.services["gitea.service"] is defined
|
||||||
- ansible_facts.services["gitea.service"].state == "running"
|
- ansible_facts.services["gitea.service"].state == "running"
|
||||||
|
|
Loading…
Reference in a new issue