diff --git a/playbooks/lehmann-jellyfin.yml b/playbooks/lehmann-jellyfin.yml new file mode 100644 index 0000000..9380d02 --- /dev/null +++ b/playbooks/lehmann-jellyfin.yml @@ -0,0 +1,63 @@ +# +# +# Automated installation for jellyfin +# +# Project: playbooks +# Author: Tobias Lehmann +# License: MIT License (see LICENSE.md) +# +# Copyright (c) captica GmbH est. 2021 +# +- hosts: "leh01" + name: Create container + vars: + lxc_id: 1051 + lxc_name: jellyfin + lxc_domain: leh01.local + lxc_template: "local:vztmpl/debian-12-standard_12.2-1_amd64.tar.zst" + lxc_mac: CC:CC:CC:18:01:90 + lxc_bridge: vmbr180 + lxc_vlan: "" + lxc_disk: datapool:32 + lxc_cpu: 4 + lxc_memory: 8096 + lxc_swap: 4048 + lxc_mounts: '{"mp0":"docker-jellyfin:2000,mp=/opt/jellyfin"}' + lxc_ssh_pub_key: ~/.ssh/id_ed25519_ansible.pub + roles: + - lxc-container + +- hosts: "jellyfin" + vars: + hostname: jellyfin + tools_install_users: + - root + - ansible + ssh_pubkeys_root: + - "../files/ssh/root.pub" + ssh_pubkeys_ansible: + - "../files/ssh/id_ed25519_ansible.pub" + roles: + - linux-base-install + - zsh + - vim + - fzf + - linux-docker + +- hosts: "jellyfin" + tags: + - jellyfin + - install + vars: + service_name: jellyfin + service_directory: /opt/jellyfin + service_volume_dirs: + - appdata + service_user_name: jellyfin + service_user_id: 1080 + service_group_name: jellyfin + service_group_id: 1080 + bankmanager_version: latest + tasks: + - name: "Install jellyfin application" + include_tasks: setup-docker-application.yml \ No newline at end of file diff --git a/templates/jellyfin/.env.j2 b/templates/jellyfin/.env.j2 new file mode 100644 index 0000000..e69de29 diff --git a/templates/jellyfin/docker-compose.yml.j2 b/templates/jellyfin/docker-compose.yml.j2 new file mode 100644 index 0000000..72aa5c8 --- /dev/null +++ b/templates/jellyfin/docker-compose.yml.j2 @@ -0,0 +1,28 @@ + +services: + + jellyfin: + image: lscr.io/linuxserver/jellyfin:latest + container_name: jellyfin + environment: + - USER_UID={{ service_user_id }} + - USER_GID={{ service_group_id }} + - TZ=Europe/Berlin + restart: always + volumes: + - {{ service_directory }}/config:/config + - /mount/media:/media + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + ports: + - '8096:8096' + networks: + - default + +networks: + default: + ipam: + driver: default + config: + - subnet: 172.5.0.0/16 + gateway: 172.5.0.1 \ No newline at end of file