From 79036481290e72ff72853334c769335ee9c23399 Mon Sep 17 00:00:00 2001 From: Koldo Aingeru Date: Wed, 16 Oct 2019 19:58:37 +0200 Subject: [PATCH] lidarr support --- README.md | 3 ++- docs/applications/lidarr.md | 12 ++++++++++ docs/configuration/application_ports.md | 1 + group_vars/all.yml.dist | 11 +++++++++ nas.yml | 4 +++- tasks/lidarr.yml | 30 +++++++++++++++++++++++++ templates/traefik/traefik.toml | 1 + 7 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 docs/applications/lidarr.md create mode 100644 tasks/lidarr.yml diff --git a/README.md b/README.md index 2175f6e6..bae385ee 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Ansible config and a bunch of Docker containers. * Any number of Samba shares or NFS exports for you to store your stuff * A BitTorrent client * A Usenet downloader -* Various media management tools - Sonarr, Sickchill, CouchPotato, Radarr, Bazarr +* Various media management tools - Sonarr, Sickchill, CouchPotato, Radarr, Bazarr, Lidarr * Media streaming via Plex or Emby * Music streaming with Airsonic * An RSS newsfeed reader - Miniflux @@ -47,6 +47,7 @@ Ansible config and a bunch of Docker containers. * [Home Assistant](https://www.home-assistant.io) - Open source home automation * [InfluxDB](https://github.com/influxdata/influxdb) - Time series database used for stats collection * [Jackett](https://github.com/Jackett/Jackett) - API Support for your favorite torrent trackers +* [Lidarr](https://github.com/lidarr/Lidarr) - Music collection manager for Usenet and BitTorrent users * [MiniDlna](https://sourceforge.net/projects/minidlna/) - simple media server which is fully compliant with DLNA/UPnP-AV clients * [Miniflux](https://miniflux.app/) - An RSS news reader * [Mosquitto](https://mosquitto.org) - An open source MQTT broker diff --git a/docs/applications/lidarr.md b/docs/applications/lidarr.md new file mode 100644 index 00000000..aa4852db --- /dev/null +++ b/docs/applications/lidarr.md @@ -0,0 +1,12 @@ +# Lidarr music collection manager + +Homepage: [https://lidarr.audio/](https://lidarr.audio/) + + +Lidarr is a music collection manager for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new tracks from your favorite artists and will grab, sort and rename them. It can also be configured to automatically upgrade the quality of files already downloaded when a better quality format becomes available. + + + +## Usage + +Set `lidarr_enabled: true` in your `group_vars/all.yml` file. diff --git a/docs/configuration/application_ports.md b/docs/configuration/application_ports.md index 06cff99b..f1a0aff0 100644 --- a/docs/configuration/application_ports.md +++ b/docs/configuration/application_ports.md @@ -22,6 +22,7 @@ By default, applications can be found on the ports listed below. | Heimdall | 10080 | | | Home Assistant | 8123 | | | Jackett | 9117 | | +| Lidarr | 8686 | | | MiniDLNA | 8201 | | | Miniflux | 8070 | | | Mosquitto | 1883 | MQTT | diff --git a/group_vars/all.yml.dist b/group_vars/all.yml.dist index ba27ed5b..6a7a18ca 100644 --- a/group_vars/all.yml.dist +++ b/group_vars/all.yml.dist @@ -43,6 +43,7 @@ bazarr_enabled: false # Music airsonic_enabled: false mymediaforalexa_enabled: false +lidarr_enabled: false # News miniflux_enabled: false @@ -403,6 +404,16 @@ bazarr_movies_directory: "{{ movies_root }}" bazarr_user_id: "0" bazarr_group_id: "0" +### +### lidarr +### +lidarr_available_externally: "false" +lidarr_data_directory: "{{ docker_home }}/lidarr/config" +lidarr_music_directory: "{{ music_root }}" +lidarr_downloads_directory: "{{ downloads_root }}" +lidarr_user_id: 0 +lidarr_group_id: 0 + ### ### Couchpotato diff --git a/nas.yml b/nas.yml index 0686021a..90020664 100644 --- a/nas.yml +++ b/nas.yml @@ -188,4 +188,6 @@ when: (openhab_enabled | default(False)) tags: openhab - + - import_tasks: tasks/lidarr.yml + when: (lidarr_enabled | default(False)) + tags: lidarr \ No newline at end of file diff --git a/tasks/lidarr.yml b/tasks/lidarr.yml new file mode 100644 index 00000000..5bd972b9 --- /dev/null +++ b/tasks/lidarr.yml @@ -0,0 +1,30 @@ +--- +- name: Create lidarr Directories + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ lidarr_data_directory }}" + +- name: lidarr + docker_container: + name: lidarr + image: linuxserver/lidarr + pull: true + volumes: + - "{{ lidarr_music_directory }}:/music:rw" + - "{{ lidarr_downloads_directory }}:/downloads:rw" + - "{{ lidarr_data_directory }}:/config:rw" + ports: + - "8686:8686" + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ lidarr_user_id }}" + PGID: "{{ lidarr_group_id }}" + restart_policy: unless-stopped + memory: 1g + labels: + traefik.backend: "lidarr" + traefik.frontend.rule: "Host:lidarr.{{ ansible_nas_domain }}" + traefik.enable: "{{ lidarr_available_externally }}" + traefik.port: "8686" \ No newline at end of file diff --git a/templates/traefik/traefik.toml b/templates/traefik/traefik.toml index aa33b2dc..36af9040 100644 --- a/templates/traefik/traefik.toml +++ b/templates/traefik/traefik.toml @@ -194,6 +194,7 @@ onDemand = false # create certificate when container is created "heimdall.{{ ansible_nas_domain }}", "homeassistant.{{ ansible_nas_domain }}", "jackett.{{ ansible_nas_domain }}", + "lidarr.{{ ansible_nas_domain }}", "miniflux.{{ ansible_nas_domain }}", "netdata.{{ ansible_nas_domain }}", "nextcloud.{{ ansible_nas_domain }}",