Compare commits

...

13 Commits
1.0.5 ... main

Author SHA1 Message Date
d8ca6c53e2 chore(release): 1.2.0 2024-01-26 19:07:08 +01:00
eded032243 feat: Add FlareSolverr docker 2024-01-26 19:06:58 +01:00
b7f45adf15 chore(release): 1.1.0 2024-01-26 13:50:54 +01:00
d7397e00b0 feat: Pull new images on running the role. 2024-01-26 13:50:50 +01:00
e0ab8fc777 chore(release): 1.0.1 2022-12-12 20:13:25 +01:00
3eb5fde403 chore: Add funding. 2022-12-12 20:13:08 +01:00
3b13618eff More cleanup. 2022-12-11 22:39:17 +01:00
e49c4f80f3 Linting. 2022-12-11 22:25:04 +01:00
ccb83be886 Lint 2022-09-30 08:00:33 +02:00
f3255fca65 Updated vilumes to support spaces. 2022-09-30 00:31:53 +02:00
3a8316f626 Set up upload directories. 2022-09-29 22:51:29 +02:00
23e6ee2fb5 Add the concept of library. 2022-09-29 22:47:28 +02:00
97752ebf58 Fix radarr name in docker-compose. 2022-09-29 22:26:08 +02:00
21 changed files with 156 additions and 57 deletions

13
.ansible-lint Normal file
View File

@ -0,0 +1,13 @@
skip_list:
- 'yaml'
- 'risky-shell-pipe'
- 'role-name'
- 'no-handler'
kinds:
- meta: "**/meta/main.yml"
- tasks: "**/tasks/*.yml"
- vars: "**/vars/*.yml"
exclude_paths:
- "**/requirements.yml"

2
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1,2 @@
github: equinoxel
patreon: laurivan

View File

@ -9,7 +9,7 @@ sudo: false
addons: addons:
apt: apt:
packages: packages:
- python-pip - python-pip
install: install:
# Install ansible # Install ansible

19
CHANGELOG.md Normal file
View File

@ -0,0 +1,19 @@
# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [1.2.0](https://git.laurivan.com/Dev/ansible-role-arrs/compare/v1.1.0...v1.2.0) (2024-01-26)
### Features
* Add FlareSolverr docker ([eded032](https://git.laurivan.com/Dev/ansible-role-arrs/commit/eded03224311a2cdc8c68dd2655d1bd42674faad))
## [1.1.0](https://git.laurivan.com/Dev/ansible-role-arrs/compare/v1.0.1...v1.1.0) (2024-01-26)
### Features
* Pull new images on running the role. ([d7397e0](https://git.laurivan.com/Dev/ansible-role-arrs/commit/d7397e00b016cab0a154ef00b4573ab7637ccd4d))
### 1.0.1 (2022-12-12)

View File

@ -32,6 +32,7 @@ If you need to install the containers with a specific user/group ID, then define
arrs_uid: arrs_uid:
arrs_gid: arrs_gid:
``` ```
The role allows oyu to specify which components will be installed: The role allows oyu to specify which components will be installed:
```yml ```yml
@ -71,6 +72,7 @@ You can specify the image version and the port exposed:
radarr_image_version: 'latest' radarr_image_version: 'latest'
radarr_host_port: 7878 radarr_host_port: 7878
``` ```
You can also overwrite the location where radarr's configuration is stored (e.g. if you already have it installed and you want to use the Ansible role): You can also overwrite the location where radarr's configuration is stored (e.g. if you already have it installed and you want to use the Ansible role):
```yml ```yml
@ -96,6 +98,7 @@ You can specify the image version and the port exposed:
sonarr_image_version: 'latest' sonarr_image_version: 'latest'
sonarr_host_port: 8989 sonarr_host_port: 8989
``` ```
You can also overwrite the location where sonarr's configuration is stored (e.g. if you already have it installed and you want to use the Ansible role): You can also overwrite the location where sonarr's configuration is stored (e.g. if you already have it installed and you want to use the Ansible role):
```yml ```yml
@ -113,7 +116,7 @@ sonarr_series_volume: '/mnt/videos/Series'
- Depending on your settings, it will also rename your current series - Depending on your settings, it will also rename your current series
- You need write access to that directory, so Sonarr can actually copy the files - You need write access to that directory, so Sonarr can actually copy the files
# Lidarr ### Lidarr
You can specify the image version and the port exposed: You can specify the image version and the port exposed:
@ -121,11 +124,13 @@ You can specify the image version and the port exposed:
lidarr_image_version: 'latest' lidarr_image_version: 'latest'
lidarr_host_port: 8686 lidarr_host_port: 8686
``` ```
You can also overwrite the location where lidarr's configuration is stored (e.g. if you already have it installed and you want to use the Ansible role): You can also overwrite the location where lidarr's configuration is stored (e.g. if you already have it installed and you want to use the Ansible role):
```yml ```yml
lidarr_config_volume: '{{ arrs_configuration_volume }}/lidarr' lidarr_config_volume: '{{ arrs_configuration_volume }}/lidarr'
``` ```
Lidarr needs a place to copy the downloaded music: Lidarr needs a place to copy the downloaded music:
```yml ```yml
@ -143,7 +148,8 @@ lidarr_music_volumes:
The `path` is the actual directory where the collection is located and the `alias` is the internal mapping name in Docker. The `path` is the actual directory where the collection is located and the `alias` is the internal mapping name in Docker.
# Jakett ### Jakett
You can specify the image version, the port exposed and to autoupdate: You can specify the image version, the port exposed and to autoupdate:
```yml ```yml
@ -151,6 +157,7 @@ jackett_image_version: 'latest'
jackett_auto_update: true jackett_auto_update: true
jackett_host_port: 9117 jackett_host_port: 9117
``` ```
You can also overwrite the location where jackett's configuration is stored (e.g. if you already have it installed and you want to use the Ansible role): You can also overwrite the location where jackett's configuration is stored (e.g. if you already have it installed and you want to use the Ansible role):
```yml ```yml
@ -173,6 +180,6 @@ You need a machine with docker and docker-compose installed.
MIT MIT
## Author Information ## Author Information
This role was created in 2022 by [Laur Ivan](https://www.laurivan.com). This role was created in 2022 by [Laur Ivan](https://www.laurivan.com).

View File

@ -32,7 +32,11 @@ radarr_image_version: 'latest'
radarr_host_port: 7878 radarr_host_port: 7878
radarr_config_volume: '{{ arrs_configuration_volume }}/radarr' radarr_config_volume: '{{ arrs_configuration_volume }}/radarr'
radarr_series_volume: '/mnt/videos/Movies' radarr_upload_volume: '/mnt/videos/Movies'
radarr_library_volumes:
- {path: '/mnt/video/Gold', alias: 'gold'}
- {path: '/mnt/video/Current', alias: 'current'}
- {path: '/mnt/video/Temporary', alias: 'temporary'}
# Sonarr # Sonarr
# #
@ -40,21 +44,32 @@ sonarr_image_version: 'latest'
sonarr_host_port: 8989 sonarr_host_port: 8989
sonarr_config_volume: '{{ arrs_configuration_volume }}/sonarr' sonarr_config_volume: '{{ arrs_configuration_volume }}/sonarr'
sonarr_series_volume: '/mnt/videos/Series' sonarr_upload_volume: '/mnt/videos/Series'
sonarr_library_volumes:
- {path: '/mnt/tv/Series', alias: 'series'}
- {path: '/mnt/tv/Animation', alias: 'animation'}
- {path: '/mnt/tv/SciFi', alias: 'scifi'}
# Lidarr # Lidarr
lidarr_image_version: 'latest' lidarr_image_version: 'latest'
lidarr_host_port: 8686 lidarr_host_port: 8686
lidarr_config_volume: '{{ arrs_configuration_volume }}/lidarr' lidarr_config_volume: '{{ arrs_configuration_volume }}/lidarr'
lidarr_music_upload_volume: '/mnt/music/Reference' lidarr_upload_volume: '/mnt/music/Reference'
lidarr_music_volumes: lidarr_library_volumes:
- {path: '/mnt/music/Sonos', alias: 'sonos' } - {path: '/mnt/music/Sonos', alias: 'sonos'}
- {path: '/mnt/music/Audiophile', alias: 'audiophile' } - {path: '/mnt/music/Audiophile', alias: 'audiophile'}
- {path: '/mnt/music/Raw', alias: 'raw' } - {path: '/mnt/music/Raw', alias: 'raw'}
# Jakett # Jakett
jackett_image_version: 'latest' jackett_image_version: 'latest'
jackett_auto_update: true jackett_auto_update: true
jackett_host_port: 9117 jackett_host_port: 9117
jackett_config_volume: '{{ arrs_configuration_volume }}/jackett' jackett_config_volume: '{{ arrs_configuration_volume }}/jackett'
# FlareSolverr
flaresolverr_log_level: info
flaresolverr_log_html: "false"
flaresolverr_captcha_solver: none
flaresolverr_timezone: 'Europe/Brussels'
flaresolverr_host_port: 8191

View File

@ -1,3 +1,4 @@
---
galaxy_info: galaxy_info:
author: Laur Ivan author: Laur Ivan
namespace: laurivan namespace: laurivan

View File

@ -9,4 +9,3 @@
roles: roles:
- role: laurivan.arrs - role: laurivan.arrs

View File

@ -8,28 +8,31 @@
register: docker_sock_stat register: docker_sock_stat
- name: Create docker.sock - name: Create docker.sock
raw: touch /var/run/docker.sock ansible.builtin.raw: touch /var/run/docker.sock
become: true become: true
changed_when: false changed_when: false
when: not docker_sock_stat.stat.exists when: not docker_sock_stat.stat.exists
- name: Move docker.sock from tmp - name: Move docker.sock from tmp
raw: mount --move /tmp/docker_mounted.sock /var/run/docker.sock ansible.builtin.raw: >
mount --move /tmp/docker_mounted.sock /var/run/docker.sock
become: true become: true
changed_when: false changed_when: false
when: not docker_sock_stat.stat.exists when: not docker_sock_stat.stat.exists
- name: Update apt cache. - name: Update apt cache.
apt: update_cache=yes cache_valid_time=600 ansible.builtin.apt: update_cache=yes cache_valid_time=600
when: ansible_os_family == 'Debian' when: ansible_os_family == 'Debian'
- name: Install python requests - name: Install python requests
pip: ansible.builtin.pip:
name: name:
- requests - requests
- docker - docker
- docker-compose - docker-compose
- name: Install docker - name: Install docker
vars: vars:
docker_service_manage: false docker_service_manage: false
include_role: ansible.builtin.include_role:
name: geerlingguy.docker name: geerlingguy.docker

View File

@ -1,6 +1,6 @@
--- ---
# tasks file for arrs # tasks file for arrs
- name: Set up directories - name: Set up main directory
ansible.builtin.file: ansible.builtin.file:
state: directory state: directory
path: "{{ item }}" path: "{{ item }}"
@ -12,13 +12,13 @@
tags: tags:
- configuration - configuration
become: true become: true
- name: Set up directories
- name: Set up config directories
ansible.builtin.file: ansible.builtin.file:
state: directory state: directory
path: "{{ item }}" path: "{{ item }}"
owner: "{% if arrs_uid %}{{ arrs_uid }}{% else %}{{ ansible_effective_user_id }}{%endif%}" owner: "{% if arrs_uid %}{{ arrs_uid }}{% else %}{{ ansible_effective_user_id }}{% endif %}"
group: "{% if arrs_gid %}{{ arrs_gid }}{% else %}{{ ansible_effective_group_id }}{%endif%}" group: "{% if arrs_gid %}{{ arrs_gid }}{% else %}{{ ansible_effective_group_id }}{% endif %}"
mode: "0750" mode: "0750"
with_items: with_items:
- "{{ deluge_config_volume }}" - "{{ deluge_config_volume }}"
@ -30,6 +30,21 @@
- configuration - configuration
become: true become: true
- name: Set up upload directories
ansible.builtin.file:
state: directory
path: "{{ item }}"
owner: "{% if arrs_uid %}{{ arrs_uid }}{% else %}{{ ansible_effective_user_id }}{% endif %}"
group: "{% if arrs_gid %}{{ arrs_gid }}{% else %}{{ ansible_effective_group_id }}{% endif %}"
mode: "0750"
with_items:
- "{{ radarr_upload_volume }}"
- "{{ sonarr_upload_volume }}"
- "{{ lidarr_upload_volume }}"
tags:
- configuration
become: true
- name: Write configuration files - name: Write configuration files
ansible.builtin.template: ansible.builtin.template:
src: "{{ item }}.j2" src: "{{ item }}.j2"
@ -42,6 +57,7 @@
- "env.sonarr.conf" - "env.sonarr.conf"
- "env.lidarr.conf" - "env.lidarr.conf"
- "env.jackett.conf" - "env.jackett.conf"
- "env.flaresolverr.conf"
tags: tags:
- configuration - configuration
@ -49,4 +65,5 @@
community.docker.docker_compose: community.docker.docker_compose:
project_src: "{{ arrs_setup_path }}" project_src: "{{ arrs_setup_path }}"
build: false build: false
pull: true
become: false become: false

View File

@ -5,10 +5,10 @@ services:
image: "lscr.io/linuxserver/deluge:{{ deluge_image_version }}" image: "lscr.io/linuxserver/deluge:{{ deluge_image_version }}"
restart: unless-stopped restart: unless-stopped
env_file: env_file:
- {{ arrs_setup_path }}/env.deluge.conf - "{{ arrs_setup_path }}/env.deluge.conf"
volumes: volumes:
- {{ deluge_config_volume }}:/config - "{{ deluge_config_volume }}:/config"
- {{ torrent_downloads_volume }}:/downloads - "{{ torrent_downloads_volume }}:/downloads"
ports: ports:
- {{ deluge_admin_port }}:8112 - {{ deluge_admin_port }}:8112
- {{ deluge_host_port }}:6881 - {{ deluge_host_port }}:6881
@ -17,15 +17,18 @@ services:
- arrs - arrs
{% endif %} {% endif %}
{% if radarr_enabled %} {% if radarr_enabled %}
sonarr: radarr:
image: "lscr.io/linuxserver/radarr:{{ radarr_image_version }}" image: "lscr.io/linuxserver/radarr:{{ radarr_image_version }}"
restart: unless-stopped restart: unless-stopped
env_file: env_file:
- {{ arrs_setup_path }}/env.radarr.conf - "{{ arrs_setup_path }}/env.radarr.conf"
volumes: volumes:
- {{ radarr_config_volume }}:/config - "{{ radarr_config_volume }}:/config"
- {{ radarr_series_volume }}:/movies - "{{ torrent_downloads_volume }}:/downloads"
- {{ torrent_downloads_volume }}:/downloads - "{{ radarr_upload_volume }}:/movies"
{% for item in radarr_library_volumes %}
- "{{ item.path }}:/library/{{ item.alias }}"
{% endfor %}
ports: ports:
- {{ radarr_host_port }}:7878 - {{ radarr_host_port }}:7878
networks: networks:
@ -36,11 +39,14 @@ services:
image: "lscr.io/linuxserver/sonarr:{{ sonarr_image_version }}" image: "lscr.io/linuxserver/sonarr:{{ sonarr_image_version }}"
restart: unless-stopped restart: unless-stopped
env_file: env_file:
- {{ arrs_setup_path }}/env.sonarr.conf - "{{ arrs_setup_path }}/env.sonarr.conf"
volumes: volumes:
- {{ sonarr_config_volume }}:/config - "{{ sonarr_config_volume }}:/config"
- {{ sonarr_series_volume }}:/tv - "{{ torrent_downloads_volume }}:/downloads"
- {{ torrent_downloads_volume }}:/downloads - "{{ sonarr_upload_volume }}:/tv"
{% for item in sonarr_library_volumes %}
- "{{ item.path }}:/library/{{ item.alias }}"
{% endfor %}
ports: ports:
- {{ sonarr_host_port }}:8989 - {{ sonarr_host_port }}:8989
networks: networks:
@ -51,12 +57,13 @@ services:
image: "lscr.io/linuxserver/lidarr:{{ lidarr_image_version }}" image: "lscr.io/linuxserver/lidarr:{{ lidarr_image_version }}"
restart: unless-stopped restart: unless-stopped
env_file: env_file:
- {{ arrs_setup_path }}/env.sonarr.conf - "{{ arrs_setup_path }}/env.sonarr.conf"
volumes: volumes:
- {{ lidarr_config_volume }}:/config - "{{ lidarr_config_volume }}:/config"
- {{ torrent_downloads_volume }}:/downloads - "{{ torrent_downloads_volume }}:/downloads"
{% for item in lidarr_music_volumes %} - "{{ lidarr_upload_volume }}:/music"
- {{ item.path }}:/music/{{ item.alias }} {% for item in lidarr_library_volumes %}
- "{{ item.path }}:/library/{{ item.alias }}"
{% endfor %} {% endfor %}
ports: ports:
- {{ lidarr_host_port }}:8686 - {{ lidarr_host_port }}:8686
@ -68,7 +75,7 @@ services:
image: "lscr.io/linuxserver/jackett:{{ jackett_image_version }}" image: "lscr.io/linuxserver/jackett:{{ jackett_image_version }}"
restart: unless-stopped restart: unless-stopped
env_file: env_file:
- {{ arrs_setup_path }}/env.jackett.conf - "{{ arrs_setup_path }}/env.jackett.conf"
volumes: volumes:
- {{ jackett_config_volume }}:/config - {{ jackett_config_volume }}:/config
- {{ torrent_downloads_volume }}:/downloads - {{ torrent_downloads_volume }}:/downloads
@ -77,7 +84,19 @@ services:
- {{ jackett_host_port }}:9117 - {{ jackett_host_port }}:9117
networks: networks:
- arrs - arrs
flaresolverr:
image: ghcr.io/flaresolverr/flaresolverr:latest
container_name: flaresolverr
env_file:
- "{{ arrs_setup_path }}/env.flaresolverr.conf"
ports:
- "{{ flaresolverr_host_port }}:8191"
restart: unless-stopped
networks:
- arrs
{% endif %} {% endif %}
networks: networks:
arrs: {} arrs: {}

View File

@ -0,0 +1,4 @@
LOG_LEVEL={{ flaresolverr_log_level }}
LOG_HTML={{ flaresolverr_log_html }}
CAPTCHA_SOLVER={{ flaresolverr_captcha_solver }}
TZ={{ flaresolverr_timezone }}