Added qbittorrent role

This commit is contained in:
Mike Wilson
2023-01-30 17:49:18 -05:00
parent 5dcdd7aad2
commit 9060206f9a
3 changed files with 45 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
[defaults] [defaults]
inventory = ./hosts.ini inventory = ./hosts.ini
interpreter_python = auto_silent interpreter_python = auto_silent
#vault_password_file - ./vault-pass.sh
[privilege_escalation] [privilege_escalation]
become_ask_pass = True become_ask_pass = True

View File

@@ -0,0 +1,21 @@
- name: Create install directory
file:
path: "{{ install_directory }}/radarr"
state: directory
owner: "{{ docker_user }}"
mode: "{{ docker_compose_directory_mask }}"
become: true
- name: Copy docker-compose file to destination
template:
src: docker-compose.yml
dest: "{{ install_directory }}/radarr/docker-compose.yml"
mode: "{{ docker_compose_file_mask }}"
validate: docker-compose -f %s config
become: true
- name: Start docker container
community.docker.docker_compose:
project_src: "{{ install_directory }}/radarr"
pull: true
remove_orphans: yes

View File

@@ -0,0 +1,23 @@
version: "{{ docker_compose_version }}"
networks:
traefik:
external: true
services:
qbittorrent:
container_name: qbittorrent
image: lscr.io/linuxserver/qbittorrent:libtorrentv1
restart: unless-stopped
network_mode: "container:gluetun"
environment:
- PUID={{ primary_uid }}
- PGID={{ media_gid }}
- TZ={{ timezone }}
volumes:
- "{{ data_dir }}/qbittorrent:/config"
- "{{ media_storage_mnt }}/data/torrents:/downloads"
labels:
traefik.enable: true
traefik.http.routers.qbittorrent.rule: "Host(`qbittorrent.local.{{ personal_domain }}`)"
traefik.http.routers.qbittorrent.middlewares: lan-whitelist@file