Added qbittorrent role
This commit is contained in:
@@ -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
|
||||||
|
21
ansible/roles/qbittorrent/tasks/main.yml
Normal file
21
ansible/roles/qbittorrent/tasks/main.yml
Normal 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
|
23
ansible/roles/qbittorrent/templates/docker-compose.yml
Normal file
23
ansible/roles/qbittorrent/templates/docker-compose.yml
Normal 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
|
Reference in New Issue
Block a user