Skip to content

Commit

Permalink
Update libraries paths
Browse files Browse the repository at this point in the history
  • Loading branch information
HadrienPatte committed May 10, 2024
1 parent 42daaa3 commit eeb760a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
8 changes: 4 additions & 4 deletions roles/mediaserver/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ containers:
- /data/state/radarr/radarr.db:/config/radarr.db
- /data/state/radarr/radarr.db-wal:/config/radarr.db-wal
- /data/state/radarr/MediaCover:/config/MediaCover
- /data:/data
- /data/media:/media

sonarr:
image: ghcr.io/hadrienpatte/sonarr
Expand All @@ -18,7 +18,7 @@ containers:
- /data/state/sonarr/sonarr.db:/config/sonarr.db
- /data/state/sonarr/sonarr.db-wal:/config/sonarr.db-wal
- /data/state/sonarr/MediaCover:/config/MediaCover
- /data:/data
- /data/media:/media

prowlarr:
image: ghcr.io/hadrienpatte/prowlarr
Expand All @@ -40,8 +40,8 @@ containers:
version: rolling
port: 8096
volumes:
- /etc/jellyfin:/config
- /data/media:/data/media
- /data/state/jellyfin:/config
- /data/media/libraries:/media/libraries

homer:
version: 24.04.1
Expand Down
12 changes: 6 additions & 6 deletions roles/mediaserver/tasks/jellyfin.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
---
- name: Check if jellyfin system config file exists
ansible.builtin.stat:
path: /etc/jellyfin/config/system.xml
path: /data/state/jellyfin/config/system.xml
register: jellyfin_system_config_file

- name: Create jellyfin system config file
ansible.builtin.copy:
dest: /etc/jellyfin/config/system.xml
dest: /data/state/jellyfin/config/system.xml
content: "<ServerConfiguration/>"
mode: 0600
when: not jellyfin_system_config_file.stat.exists
notify: Restart jellyfin

- name: Enable jellyfin metrics
community.general.xml:
path: /etc/jellyfin/config/system.xml
path: /data/state/jellyfin/config/system.xml
xpath: /ServerConfiguration/EnableMetrics
value: "true"
notify: Restart jellyfin

- name: Check if jellyfin network config file exists
ansible.builtin.stat:
path: /etc/jellyfin/config/network.xml
path: /data/state/jellyfin/config/network.xml
register: jellyfin_network_config_file

- name: Create jellyfin network config file
ansible.builtin.copy:
dest: /etc/jellyfin/config/network.xml
dest: /data/state/jellyfin/config/network.xml
content: "<NetworkConfiguration/>"
mode: 0600
when: not jellyfin_network_config_file.stat.exists
notify: Restart jellyfin

- name: Enable jellyfin metrics
community.general.xml:
path: /etc/jellyfin/config/network.xml
path: /data/state/jellyfin/config/network.xml
xpath: /NetworkConfiguration/BaseUrl
value: "/jellyfin"
notify: Restart jellyfin
9 changes: 5 additions & 4 deletions roles/mediaserver/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,12 @@
- /data
- /data/media
- /data/media/downloads
- /data/media/movies
- /data/media/tv
- /data/media/libraries
- /data/media/libraries/movies
- /data/media/libraries/shows
- /data/state/qbittorrent
- /etc/jellyfin
- /etc/jellyfin/config
- /data/state/jellyfin
- /data/state/jellyfin/config

- name: Configure qbittorrent
ansible.builtin.include_tasks: qbittorrent.yml
Expand Down

0 comments on commit eeb760a

Please sign in to comment.