From 061c375652275b43e4093d798e456620944b6f71 Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Tue, 14 Feb 2023 13:31:04 -0800 Subject: [PATCH] Use new NAS paths --- ansible_playbooks/setup-cluster.yml | 85 ++++++++++++----------------- services/ip-dvr.nomad | 26 +++------ 2 files changed, 41 insertions(+), 70 deletions(-) diff --git a/ansible_playbooks/setup-cluster.yml b/ansible_playbooks/setup-cluster.yml index c3db799..d7c723c 100644 --- a/ansible_playbooks/setup-cluster.yml +++ b/ansible_playbooks/setup-cluster.yml @@ -192,26 +192,18 @@ hosts: nomad_instances become: true vars: - shared_nfs_mounts: [] - # - src: 192.168.2.10:/Multimedia - # path: /srv/volumes/media-read - # opts: proto=tcp,port=2049,ro - # - # - src: 192.168.2.10:/Multimedia - # path: /srv/volumes/media-write - # opts: proto=tcp,port=2049,rw - # - # - src: 192.168.2.10:/Photos - # path: /srv/volumes/photos - # opts: proto=tcp,port=2049,rw - # - # - src: 192.168.2.10:/Download - # path: /srv/volumes/download - # opts: proto=tcp,port=2049,rw - # - # - src: 192.168.2.10:/Container - # path: /srv/volumes/container - # opts: proto=tcp,port=2049,rw + shared_nfs_mounts: + - src: 192.168.2.10:/Media + path: /srv/volumes/media-read + opts: proto=tcp,port=2049,ro + + - src: 192.168.2.10:/Media + path: /srv/volumes/media-write + opts: proto=tcp,port=2049,rw + + - src: 192.168.2.10:/Photos + path: /srv/volumes/photos + opts: proto=tcp,port=2049,rw tasks: - name: Install nfs @@ -234,43 +226,34 @@ become: true vars: - shared_host_volumes: [] - # - name: media-read - # path: /srv/volumes/media-write - # read_only: true - # - name: media-write - # path: /srv/volumes/media-write - # owner: "root" - # group: "root" - # mode: "0755" - # read_only: false + shared_host_volumes: + - name: media-read + path: /srv/volumes/media-write + read_only: true + - name: media-write + path: /srv/volumes/media-write + owner: "root" + group: "root" + mode: "0755" + read_only: false + - name: media-downloads + path: /srv/volumes/media-write/Downloads + read_only: false + - name: photoprism-media + path: /srv/volumes/photos/Photoprism + read_only: false # - name: tv-sonarr # path: "/srv/volumes/media-write/TV Shows" # owner: 1001 # group: 100 # mode: "0755" # read_only: false - # - name: download - # path: /srv/volumes/download - # owner: 1001 - # group: 100 - # mode: "0755" - # read_only: false - # - name: nzbget-data - # path: /srv/volumes/container/nzbget/config - # read_only: false - # - name: gitea-data - # path: /srv/volumes/container/gitea - # read_only: false - # - name: photoprism-media - # path: /srv/volumes/photos/Photoprism - # read_only: false - # - name: all-volumes - # path: /srv/volumes - # owner: "root" - # group: "root" - # mode: "0755" - # read_only: false + - name: all-volumes + path: /srv/volumes + owner: "root" + group: "root" + mode: "0755" + read_only: false roles: - name: ansible-nomad diff --git a/services/ip-dvr.nomad b/services/ip-dvr.nomad index 21a3474..c95a8d5 100644 --- a/services/ip-dvr.nomad +++ b/services/ip-dvr.nomad @@ -19,10 +19,10 @@ job "ipdvr" { source = "nzbget-data" } - volume "download" { + volume "media-downloads" { type = "host" read_only = false - source = "download" + source = "media-downloads" } service { @@ -80,7 +80,7 @@ job "ipdvr" { } volume_mount { - volume = "download" + volume = "media-downloads" destination = "/downloads" read_only = false } @@ -109,16 +109,10 @@ job "ipdvr" { source = "sonarr-data" } - volume "tv-sonarr" { + volume "media-write" { type = "host" read_only = false - source = "tv-sonarr" - } - - volume "download" { - type = "host" - read_only = false - source = "download" + source = "media-write" } service { @@ -180,14 +174,8 @@ job "ipdvr" { } volume_mount { - volume = "tv-sonarr" - destination = "/tv" - read_only = false - } - - volume_mount { - volume = "download" - destination = "/downloads" + volume = "media-write" + destination = "/media" read_only = false }