-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support more variables, general fixes (#9)
* templates: move to ansible_managed * readme: update with new variables * defaults: add new variables, move fail2ban defaults from template to defaults file * templates/config: add support for optional vars, rearrange config file, fix #3 * .ansible-lint: remove skipping yaml line-length, add production profile * defaults: remove blank line to make ansible-lint happy
- Loading branch information
1 parent
a991375
commit 0cbd9b3
Showing
7 changed files
with
81 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
skip_list: | ||
- yaml[line-length] | ||
profile: production |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,55 +5,87 @@ Ansible role to install and configure [Jellyfin](https://jellyfin.org/) on Debia | |
![push-galaxy](https://github.com/sleepy-nols/ansible-jellyfin/actions/workflows/ansible-galaxy-push-role.yml/badge.svg) | ||
![Ansible ](https://img.shields.io/badge/Ansible_Galaxy-sleepy--nols.jellyfin-blue?url=https://galaxy.ansible.com/api/v2/collections/ibm/ibm_zos_core/&query=latest_version.version) | ||
|
||
|
||
--- | ||
## Role Variables and Defaults | ||
|
||
User that Jellyfin runs as. | ||
```yml | ||
jellyfin_user: "jellyfin" | ||
``` | ||
Skip restarting Jellyfin, even on config change. | ||
User that Jellyfin runs as. | ||
```yml | ||
jellyfin_skip_restart: false | ||
``` | ||
Enable fail2ban integration for the Jellyfin login. | ||
Skip restarting Jellyfin, even on config change. | ||
### fail2ban | ||
```yml | ||
jellyfin_enable_fail2ban: false | ||
``` | ||
Set these if you use custom ports for Jellyfin. | ||
Enable fail2ban integration for the Jellyfin login. | ||
```yml | ||
jellyfin_fail2ban_ports: | ||
- "80" | ||
- "443" | ||
``` | ||
Configuration of fail2ban parameters. You probably want to tweak these according to your userbase and threatmodel. | ||
Set these if you use custom ports for Jellyfin. | ||
```yml | ||
jellyfin_fail2ban_maxretry: "3" | ||
jellyfin_fail2ban_bantime: "6000" | ||
jellyfin_fail2ban_findtime: "600" | ||
``` | ||
Configuration of fail2ban parameters. You probably want to tweak these according to your userbase and threatmodel. | ||
### Jellyfin | ||
```yml | ||
jellyfin_cache_dir: "/var/cache/jellyfin" | ||
jellyfin_log_dir: "/var/log/jellyfin" | ||
jellyfin_config_dir: "/etc/jellyfin" | ||
jellyfin_data_dir: "/var/lib/jellyfin" | ||
``` | ||
Jellyfin directories. | ||
Additional Jellyfin options as in [Main Configuration Options](https://jellyfin.org/docs/general/administration/configuration#main-configuration-options) | ||
```yml | ||
jellyfin_additional_opts: "" | ||
jellyfin_restart_bin: "/usr/lib/jellyfin/restart.sh" | ||
jellyfin_ffmpeg_bin: "/usr/lib/jellyfin-ffmpeg/ffmpeg" | ||
jellyfin_web_bin: "/usr/share/jellyfin/web" | ||
``` | ||
Jellyfin binary paths. | ||
Jellyfin Paths | ||
```yml | ||
jellyfin_restart_opt: "--restartpath=/usr/lib/jellyfin/restart.sh" | ||
jellyfin_ffmpeg_opt: "--ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg" | ||
jellyfin_web_opt: "--webdir=/usr/share/jellyfin/web" | ||
jellyfin_additional_opts: str | ||
``` | ||
**Optional:** Additional Jellyfin options as in [Main Configuration Options](https://jellyfin.org/docs/general/administration/configuration#main-configuration-options) | ||
```yml | ||
jellyfin_service: bool | ||
``` | ||
**Optional:** Run Jellyfin as a headless service. | ||
Jellyfin Directories | ||
```yml | ||
jellyfin_cache_dir: "/var/cache/jellyfin" | ||
jellyfin_log_dir: "/var/log/jellyfin" | ||
jellyfin_config_dir: "/etc/jellyfin" | ||
jellyfin_data_dir: "/var/lib/jellyfin" | ||
jellyfin_nowebapp: bool | ||
``` | ||
**Optional:** Run Jellyfin without the web app. | ||
### Advanced | ||
```yml | ||
jellyfin_complus_gcserver: int | ||
``` | ||
**Optional:** Run Jellyfin with ASP.NET Server Garbage Collection (uses more RAM and less CPU than Workstation GC). 0=Workstation, 1=Server. | ||
```yml | ||
jellyfin_malloc_trim_threshold: 131072 | ||
``` | ||
Disable glibc dynamic heap adjustment. | ||
--- | ||
## Installing | ||
Install via Ansible Galaxy or clone the Repo | ||
|
@@ -62,7 +94,7 @@ ansible-galaxy role install sleepy-nols.jellyfin | |
|
||
git clone [email protected]:sleepy-nols/ansible-jellyfin.git | ||
``` | ||
|
||
--- | ||
## Example Playbook | ||
|
||
```yml | ||
|
@@ -71,9 +103,11 @@ git clone [email protected]:sleepy-nols/ansible-jellyfin.git | |
- sleepy-nols.jellyfin | ||
``` | ||
--- | ||
## Contributing | ||
Contributions on are welcome, please write meaningfull commit messages :) | ||
--- | ||
## License | ||
GPLv3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,24 @@ | ||
--- | ||
|
||
jellyfin_name: "jellyfin" | ||
jellyfin_user: "{{ jellyfin_name }}" | ||
jellyfin_skip_apt_key: false | ||
jellyfin_skip_restart: false | ||
|
||
jellyfin_enable_fail2ban: false | ||
jellyfin_fail2ban_ports: | ||
- "80" | ||
- "443" | ||
jellyfin_fail2ban_maxretry: 3 | ||
jellyfin_fail2ban_bantime: 6000 | ||
jellyfin_fail2ban_findtime: 600 | ||
|
||
jellyfin_user: "jellyfin" | ||
|
||
jellyfin_additional_opts: "" | ||
|
||
# Paths | ||
jellyfin_restart_opt: "--restartpath=/usr/lib/jellyfin/restart.sh" | ||
jellyfin_ffmpeg_opt: "--ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg" | ||
jellyfin_web_opt: "--webdir=/usr/share/jellyfin/web" | ||
|
||
# Directories | ||
jellyfin_cache_dir: "/var/cache/jellyfin" | ||
jellyfin_log_dir: "/var/log/jellyfin" | ||
jellyfin_config_dir: "/etc/jellyfin" | ||
jellyfin_data_dir: "/var/lib/jellyfin" | ||
|
||
# optional | ||
# jellyfin_nowebapp_opt: "--nowebclient" | ||
# jellyfin_service_opt: "--service" | ||
jellyfin_web_bin: "/usr/share/jellyfin/web" | ||
jellyfin_restart_bin: "/usr/lib/jellyfin/restart.sh" | ||
jellyfin_ffmpeg_bin: "/usr/lib/jellyfin-ffmpeg/ffmpeg" | ||
|
||
jellyfin_additional_opts: "" | ||
|
||
jellyfin_malloc_trim_threshold: 131072 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# | ||
# Ansible managed | ||
# {{ ansible_managed }} | ||
# | ||
|
||
[Definition] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# | ||
# Ansible Managed | ||
# {{ ansible_managed }} | ||
# | ||
|
||
Types: deb | ||
|