From 14da8cd5a1b3a0cbe86c217a0909e10a66e40cf6 Mon Sep 17 00:00:00 2001 From: Marius Meyer Date: Mon, 3 Jun 2024 14:29:14 +0200 Subject: [PATCH] gitea data/config base_path var --- handlers/backup.yaml | 2 +- tasks/main.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 }}"