Update gitea to new nas location

This commit is contained in:
2026-04-14 18:13:14 +01:00
parent 2c380b511c
commit 1f9496ec73
3 changed files with 19 additions and 6 deletions
+16 -3
View File
@@ -9,10 +9,10 @@
mounts:
gitea_repos:
local: "/mnt/gitea-repos"
remote: "/volume1/gitea-repos"
remote: "/var/nfs/shared/gitea_repos"
gitea_backups:
local: "/mnt/gitea-backups"
remote: "/volume1/gitea-backups"
remote: "/var/nfs/shared/gitea_backups"
@@ -45,6 +45,19 @@
# update_cache: true
# become: true
- name: Stop gitea services if running
community.docker.docker_compose_v2:
project_src: "{{ ansible_env.HOME }}/gitea/"
state: absent
ignore_errors: true
- name: Unmount NFS volumes before creating mountpoint directories
ansible.posix.mount:
path: "{{ item.value.local }}"
state: unmounted
loop: "{{ mounts | dict2items }}"
become: true
- name: Create mountpoint directories for gitea
ansible.builtin.file:
path: "{{ item.value.local }}"
@@ -55,7 +68,7 @@
- name: Mount an NFS volume for repositories
ansible.posix.mount:
src: "nas.localdomain:{{ item.value.remote }}"
src: "192.168.1.160:{{ item.value.remote }}"
path: "{{ item.value.local }}"
opts: nfsvers=3,proto=tcp,rw
state: mounted