gitea data/config base_path var
All checks were successful
ansible-lint / Ansible Lint (push) Successful in 36s

This commit is contained in:
Marius Meyer 2024-06-03 14:29:14 +02:00
parent 50e6c10349
commit 14da8cd5a1
2 changed files with 3 additions and 3 deletions

View File

@ -18,7 +18,7 @@
- name: Backup Gitea directory - name: Backup Gitea directory
community.general.archive: 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" dest: "/var/backups/gitea-{{ gitea.hostname }}.{{ gitea.domain }}@{{ lookup('pipe', 'date -u +%Y-%m-%dT%H:%M:%SZ') }}.tar.gz"
force_archive: true force_archive: true
format: gz format: gz

View File

@ -16,11 +16,11 @@
state: directory state: directory
owner: root owner: root
mode: "755" mode: "755"
with_items: ["/opt/gitea", "/var/lib/gitea"] with_items: ["/opt/gitea", "{{ gitea_vars.base_path }}"]
- name: Ensure data and config directories exist - name: Ensure data and config directories exist
ansible.builtin.file: ansible.builtin.file:
path: "/var/lib/gitea/{{ item }}" path: "{{ gitea_vars.base_path }}/{{ item }}"
state: directory state: directory
owner: "{{ git_user.uid }}" owner: "{{ git_user.uid }}"
group: "{{ git_user.group }}" group: "{{ git_user.group }}"