diff --git a/README.md b/README.md index 0475e8374f..e11bf4ca78 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,7 @@ If you have a spare domain name you can configure applications to be accessible * [Traefik](https://traefik.io/) - Web proxy and SSL certificate manager * [Transmission](https://transmissionbt.com/) - BitTorrent client (with OpenVPN if you have a supported VPN provider) * [Ubooquity](http://vaemendis.net/ubooquity/) - Book and comic server +* [Unpackerr](https://github.com/davidnewhall/unpackerr/) - Extracts compressed archive files. * [uTorrent](https://www.utorrent.com/) - The best torrent downloading app for beginners * [Virtual Desktop](https://github.com/RattyDAVE/docker-ubuntu-xrdp-mate-custom) - A virtual desktop running on your NAS. * [Wallabag](https://wallabag.org/) - Save and classify articles. Read them later. diff --git a/nas.yml b/nas.yml index a453b0b71d..9312ac3dae 100644 --- a/nas.yml +++ b/nas.yml @@ -426,6 +426,11 @@ - ubooquity when: (ubooquity_enabled | default(False)) + - role: unpackerr + tags: + - unpackerr + when: (unpackerr_enabled | default(False)) + - role: utorrent tags: - utorrent diff --git a/roles/unpackerr/defaults/main.yml b/roles/unpackerr/defaults/main.yml new file mode 100644 index 0000000000..f0385e1230 --- /dev/null +++ b/roles/unpackerr/defaults/main.yml @@ -0,0 +1,19 @@ +--- +unpackerr_enabled: false +unpackerr_available_externally: false + +# directories +unpackerr_movies_directory: "{{ movies_root }}" +unpackerr_download_directory: "{{ downloads_root }}" +unpackerr_data_directory: "{{ docker_home }}/unpackerr" +unpackerr_tv_directory: "{{ tv_root }}" + +# uid / gid +unpackerr_user_id: "0" +unpackerr_group_id: "0" + +# network +unpackerr_hostname: "unpackerr" + +# specs +unpackerr_memory: 1g diff --git a/roles/unpackerr/tasks/main.yml b/roles/unpackerr/tasks/main.yml new file mode 100644 index 0000000000..513fe3a455 --- /dev/null +++ b/roles/unpackerr/tasks/main.yml @@ -0,0 +1,37 @@ +--- +- name: Create Unpackerr Directories + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ unpackerr_data_directory }}" + +- name: "Check if unpackerr config exists" + stat: + path: "{{ unpackerr_data_directory }}/unpackerr.conf" + register: unpackerr_config_path + +- name: Download Unpackerr default config + get_url: + url: https://raw.githubusercontent.com/davidnewhall/unpackerr/master/examples/unpackerr.conf.example + dest: "{{ unpackerr_data_directory }}/unpackerr.conf" + force: no + backup: yes + when: not unpackerr_config_path.stat.exists + +- name: Unpackerr + docker_container: + name: unpackerr + image: golift/unpackerr + pull: true + volumes: + - "{{ unpackerr_movies_directory }}:/movies:rw" + - "{{ unpackerr_download_directory }}:/downloads:rw" + - "{{ unpackerr_tv_directory }}:/tv:rw" + - "{{ unpackerr_data_directory }}:/config:rw" + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ unpackerr_user_id }}" + PGID: "{{ unpackerr_group_id }}" + restart_policy: unless-stopped + memory: "{{ unpackerr_memory }}" diff --git a/website/docs/applications/download-tools/unpackerr.md b/website/docs/applications/download-tools/unpackerr.md new file mode 100644 index 0000000000..ca5dbf4e91 --- /dev/null +++ b/website/docs/applications/download-tools/unpackerr.md @@ -0,0 +1,13 @@ +--- +title: "Unpackerr" +--- + +Homepage: + +Unpackerr runs as a daemon on your download host. It checks for completed downloads and extracts them so Lidarr, Radarr, Readarr, and Sonarr may import them. There are a handful of options out there for extracting and deleting files after your client downloads them. I just didn't care for any of them, so I wrote my own. I wanted a small single-binary with reasonable logging that can extract downloaded archives and clean up the mess after they've been imported. + +## Usage + +Set `unpackerr_enabled: true` in your `inventories//nas.yml` file. + +Then edit `unpackerr.conf` to fit your requirements, and restart the docker instance to apply. \ No newline at end of file