diff --git a/group_vars/all.yml b/group_vars/all.yml index e9cd5f8..a93e864 100644 --- a/group_vars/all.yml +++ b/group_vars/all.yml @@ -21,7 +21,7 @@ haproxy: - drone.badjware.dev - ci.badjware.dev - grafana.badjware.dev - - jellyfin.badjware.dev + # - jellyfin.badjware.dev - chat.badjware.dev backend: - server: 192.168.20.20:8443 @@ -69,6 +69,11 @@ haproxy: - 192.168.20.20/24 - 192.168.30.20/24 - 10.100.0.0/24 + - frontend: + - jellyfin.badjware.dev + backend: + - server: 192.168.20.34:8096 + ssl: false - frontend: - hass.badjware.dev backend: diff --git a/hosts b/hosts index 6d83f97..40590d1 100644 --- a/hosts +++ b/hosts @@ -67,6 +67,15 @@ all: ansible_host: 192.168.20.33 exposed_usb_devices: - 2-1 + jellyfin: + hosts: + jellyfin: + ansible_host: 192.168.20.34 + nfs: + - path: /mnt/Movies + src: 192.168.20.30:/mnt/pool0/media/Movies + - path: /mnt/Series + src: 192.168.20.30:/mnt/pool0/media/Series k3s: children: k3s-server: @@ -109,6 +118,7 @@ all: cups: usbip: pihole: + jellyfin: vars: ansible_user: ansible ansible_password: !vault | diff --git a/playbook.yml b/playbook.yml index 276924a..00a32b0 100644 --- a/playbook.yml +++ b/playbook.yml @@ -63,6 +63,10 @@ roles: - cups +- hosts: jellyfin + roles: + - jellyfin + # we want node metrics on the satisfactory server - hosts: satisfactory roles: diff --git a/roles/jellyfin/meta/main.yml b/roles/jellyfin/meta/main.yml new file mode 100644 index 0000000..7d4455d --- /dev/null +++ b/roles/jellyfin/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - role: nfs-client \ No newline at end of file diff --git a/roles/jellyfin/tasks/main.yml b/roles/jellyfin/tasks/main.yml new file mode 100644 index 0000000..797b06a --- /dev/null +++ b/roles/jellyfin/tasks/main.yml @@ -0,0 +1,23 @@ +- name: Download jellyfin repository gpg key + get_url: + url: https://repo.jellyfin.org/jellyfin_team.gpg.key + dest: /etc/apt/keyrings/jellyfin.asg + +- name: Add jellyfin repository + apt_repository: + repo: deb [arch=amd64 signed-by=/etc/apt/keyrings/jellyfin.asg] https://repo.jellyfin.org/ubuntu {{ ansible_distribution_release }} main + +- name: Install jellyfin + apt: + update_cache: true + name: + - jellyfin-server + - jellyfin-web + - jellyfin-ffmpeg6 # for transcode + - intel-opencl-icd # for transcode + +- name: Enable jellyfin service + systemd: + name: jellyfin + state: started + enabled: yes diff --git a/roles/nfs-client/defaults/main.yml b/roles/nfs-client/defaults/main.yml new file mode 100644 index 0000000..c740dce --- /dev/null +++ b/roles/nfs-client/defaults/main.yml @@ -0,0 +1 @@ +nfs: [] \ No newline at end of file diff --git a/roles/nfs-client/tasks/main.yml b/roles/nfs-client/tasks/main.yml new file mode 100644 index 0000000..11e3d69 --- /dev/null +++ b/roles/nfs-client/tasks/main.yml @@ -0,0 +1,13 @@ +- name: Install nfs-common + apt: + update_cache: true + name: + - nfs-common + +- name: Create fstab entries + mount: + path: "{{ item.path }}" + src: "{{ item.src }}" + fstype: nfs + state: mounted + loop: "{{ nfs }}" \ No newline at end of file