diff --git a/handlers/backup.yaml b/handlers/backup.yaml index a04fc0b..3a7455f 100644 --- a/handlers/backup.yaml +++ b/handlers/backup.yaml @@ -18,7 +18,7 @@ - name: Backup Gitea directory community.general.archive: - path: /var/lib/gitea/ + path: "{{ gitea_vars.base_path }}/" dest: "/var/backups/gitea-{{ gitea.hostname }}.{{ gitea.domain }}@{{ lookup('pipe', 'date -u +%Y-%m-%dT%H:%M:%SZ') }}.tar.gz" force_archive: true format: gz diff --git a/tasks/main.yaml b/tasks/main.yaml index 362cb3a..a3b2cdc 100644 --- a/tasks/main.yaml +++ b/tasks/main.yaml @@ -16,11 +16,11 @@ state: directory owner: root mode: "755" - with_items: ["/opt/gitea", "/var/lib/gitea"] + with_items: ["/opt/gitea", "{{ gitea_vars.base_path }}"] - name: Ensure data and config directories exist ansible.builtin.file: - path: "/var/lib/gitea/{{ item }}" + path: "{{ gitea_vars.base_path }}/{{ item }}" state: directory owner: "{{ git_user.uid }}" group: "{{ git_user.group }}"