Added Sonarr, Radarr, Lidarr and Prowlarr to aya01

Signed-off-by: TuDatTr <tuan-dat.tran@tudattr.dev>
pull/1/head
TuDatTr 2023-04-14 19:02:45 +02:00
parent 6c0ea656eb
commit 3d7f143a2a
9 changed files with 225 additions and 8 deletions

View File

@ -231,6 +231,7 @@ plex_port: "32400"
plex_config: "{{docker_data_dir}}/plex/config" plex_config: "{{docker_data_dir}}/plex/config"
plex_tv: "/media/series" plex_tv: "/media/series"
plex_movies: "/media/movies" plex_movies: "/media/movies"
plex_music: "/media/songs"
# #
# WireGuard # WireGuard
@ -243,6 +244,45 @@ wg_deps: "wireguard"
wg_ip: "192.168.200.2" wg_ip: "192.168.200.2"
wg_pubkey: "+LaPESyBF6Sb1lqkk4UcestFpXNaKYyyX99tkqwLQhU=" wg_pubkey: "+LaPESyBF6Sb1lqkk4UcestFpXNaKYyyX99tkqwLQhU="
wg_endpoint: "borg.land:51820" wg_endpoint: "{{ local_domain }}:51820"
wg_allowed_ips: "192.168.20.0/24,192.168.200.1/32" wg_allowed_ips: "192.168.20.0/24,192.168.200.1/32"
wg_dns: "{{ aya01_ip }},{{ pi_ip }},1.1.1.1" wg_dns: "{{ aya01_ip }},{{ pi_ip }},1.1.1.1"
arr_downloads: "{{ docker_data_dir }}/arr_downloads"
#
# Sonarr
#
sonarr_port: "8989"
sonarr_host: "sonarr"
sonarr_config: "{{ docker_dir }}/sonarr/config"
sonarr_media: "{{ plex_tv }}"
sonarr_downloads: "{{ arr_downloads }}/sonarr"
#
# Radarr
#
radarr_port: "7878"
radarr_host: "radarr"
radarr_config: "{{ docker_dir }}/radarr/config"
radarr_media: "{{ plex_movies }}"
radarr_downloads: "{{ arr_downloads }}/radarr"
#
# Lidarr
#
lidarr_port: "8686"
lidarr_host: "lidarr"
lidarr_config: "{{ docker_dir }}/lidarr/config"
lidarr_media: "{{ plex_music }}"
lidarr_downloads: "{{ arr_downloads }}/lidarr"
#
# Prowlarr
#
prowlarr_port: "9696"
prowlarr_host: "prowlarr"
prowlarr_config: "{{ docker_dir }}/prowlarr/config"

View File

@ -1,5 +1,5 @@
ansible_user: "{{ user }}" ansible_user: "{{ user }}"
ansible_host: 192.168.20.11 ansible_host: 192.168.20.11
ansible_port: 22 ansible_port: 22
ansible_ssh_private_key_file: /mnt/veracrypt1/genesis ansible_ssh_private_key_file: /media/veracrypt1/genesis
ansible_become_pass: '{{ vault_pi_tudattr_password }}' ansible_become_pass: '{{ vault_pi_tudattr_password }}'

View File

@ -32,6 +32,22 @@
tags: tags:
- plex - plex
- include_tasks: sonarr.yml
tags:
- sonarr
- include_tasks: radarr.yml
tags:
- radarr
- include_tasks: lidarr.yml
tags:
- lidarr
- include_tasks: prowlarr.yml
tags:
- prowlarr
- name: Copy the compose file - name: Copy the compose file
template: template:
src: templates/aya01/compose.yaml src: templates/aya01/compose.yaml

View File

@ -0,0 +1,13 @@
---
- name: Create lidarr directories
file:
path: "{{ item }}"
owner: "{{ puid }}"
group: "{{ pgid }}"
mode: '755'
state: directory
become: yes
loop:
- "{{ lidarr_config }}"
- "{{ lidarr_media }}"
- "{{ lidarr_downloads }}"

View File

@ -1,9 +1,22 @@
--- ---
- name: Create plex-config directory - name: Create plex-config directory
file: file:
path: "{{plex_config}}" path: "{{ plex_config }}"
owner: 1000 owner: "{{ puid }}"
group: 1000 group: "{{ pgid }}"
mode: '755' mode: '755'
state: directory state: directory
become: yes become: yes
- name: Create plex media directories
file:
path: "{{ item }}"
owner: "{{ puid }}"
group: "{{ pgid }}"
mode: '755'
state: directory
become: yes
loop:
- "{{ plex_tv }}"
- "{{ plex_movies }}"
- "{{ plex_music }}"

View File

@ -0,0 +1,11 @@
---
- name: Create prowlarr directories
file:
path: "{{ item }}"
owner: "{{ puid }}"
group: "{{ pgid }}"
mode: '755'
state: directory
become: yes
loop:
- "{{ prowlarr_config }}"

View File

@ -0,0 +1,13 @@
---
- name: Create radarr directories
file:
path: "{{ item }}"
owner: "{{ puid }}"
group: "{{ pgid }}"
mode: '755'
state: directory
become: yes
loop:
- "{{ radarr_config }}"
- "{{ radarr_media }}"
- "{{ radarr_downloads }}"

View File

@ -0,0 +1,13 @@
---
- name: Create sonarr directories
file:
path: "{{ item }}"
owner: "{{ puid }}"
group: "{{ pgid }}"
mode: '755'
state: directory
become: yes
loop:
- "{{ sonarr_config }}"
- "{{ sonarr_media }}"
- "{{ sonarr_downloads }}"

View File

@ -82,6 +82,9 @@ services:
- "{{ pihole_config }}:/etc/pihole/" - "{{ pihole_config }}:/etc/pihole/"
- "{{ pihole_dnsmasq }}:/etc/dnsmasq.d/" - "{{ pihole_dnsmasq }}:/etc/dnsmasq.d/"
environment: environment:
- PUID={{puid}}
- PGID={{pgid}}
- TZ={{timezone}}
- "WEBPASSWORD={{ vault_aya01_pihole_password }}" - "WEBPASSWORD={{ vault_aya01_pihole_password }}"
- "ServerIP={{aya01_ip}}" - "ServerIP={{aya01_ip}}"
- "INTERFACE=eth0" - "INTERFACE=eth0"
@ -111,8 +114,9 @@ services:
volumes: volumes:
- "{{syncthing_data}}:/var/syncthing" - "{{syncthing_data}}:/var/syncthing"
environment: environment:
- "PUID={{ puid }}" - PUID={{puid}}
- "PGID={{ pgid }}" - PGID={{pgid}}
- TZ={{timezone}}
hostname: syncthing hostname: syncthing
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
@ -125,6 +129,10 @@ services:
restart: unless-stopped restart: unless-stopped
networks: networks:
- net - net
environment:
- PUID={{puid}}
- PGID={{pgid}}
- TZ={{timezone}}
ports: ports:
- 23231:23231 # ssh - 23231:23231 # ssh
volumes: volumes:
@ -136,6 +144,10 @@ services:
restart: unless-stopped restart: unless-stopped
networks: networks:
- net - net
environment:
- PUID={{puid}}
- PGID={{pgid}}
- TZ={{timezone}}
ports: ports:
- "{{cupsd_port}}:631" - "{{cupsd_port}}:631"
volumes: volumes:
@ -152,6 +164,10 @@ services:
restart: always restart: always
networks: networks:
- net - net
environment:
- PUID={{puid}}
- PGID={{pgid}}
- TZ={{timezone}}
ports: ports:
- "{{ kuma_port }}:3001" - "{{ kuma_port }}:3001"
volumes: volumes:
@ -181,16 +197,98 @@ services:
- PGID={{pgid}} - PGID={{pgid}}
- TZ={{timezone}} - TZ={{timezone}}
- VERSION=docker - VERSION=docker
- PLEX_CLAIM=claim-wofbDBCEMQT8SxUs1-Rw #optional
volumes: volumes:
- "{{ plex_config }}:/config" - "{{ plex_config }}:/config"
- "{{ plex_tv }}:/tv" - "{{ plex_tv }}:/tv"
- "{{ plex_movies }}:/movies" - "{{ plex_movies }}:/movies"
- "{{ plex_music }}:/music"
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.routers.{{plex_host}}.rule=Host(`{{ plex_host }}.{{ aya01_host }}.{{local_domain}}`)" - "traefik.http.routers.{{plex_host}}.rule=Host(`{{ plex_host }}.{{ aya01_host }}.{{local_domain}}`)"
- "traefik.http.services.{{plex_host}}.loadbalancer.server.port={{ plex_port }}" - "traefik.http.services.{{plex_host}}.loadbalancer.server.port={{ plex_port }}"
sonarr:
image: lscr.io/linuxserver/sonarr:latest
container_name: sonarr
restart: always
networks:
- net
environment:
- PUID={{ puid }}
- PGID={{ pgid }}
- TZ={{ timezone }}
volumes:
- {{ sonarr_config }}:/config
- {{ sonarr_media }}:/tv #optional
- {{ sonarr_downloads }}:/downloads #optional
ports:
- {{ sonarr_port }}:8989
labels:
- "traefik.enable=true"
- "traefik.http.routers.{{sonarr_host}}.rule=Host(`{{ sonarr_host }}.{{ aya01_host }}.{{local_domain}}`)"
- "traefik.http.services.{{sonarr_host}}.loadbalancer.server.port={{ sonarr_port }}"
radarr:
image: lscr.io/linuxserver/radarr:latest
container_name: radarr
restart: always
networks:
- net
environment:
- PUID={{ puid }}
- PGID={{ pgid }}
- TZ={{ timezone }}
volumes:
- {{ radarr_config }}:/config
- {{ radarr_media }}:/movies #optional
- {{ radarr_downloads }}:/downloads #optional
ports:
- {{ radarr_port }}:7878
labels:
- "traefik.enable=true"
- "traefik.http.routers.{{radarr_host}}.rule=Host(`{{ radarr_host }}.{{ aya01_host }}.{{local_domain}}`)"
- "traefik.http.services.{{radarr_host}}.loadbalancer.server.port={{ radarr_port }}"
lidarr:
image: lscr.io/linuxserver/lidarr:latest
container_name: lidarr
restart: always
networks:
- net
environment:
- PUID={{ puid }}
- PGID={{ pgid }}
- TZ={{ timezone }}
volumes:
- {{ lidarr_config }}:/config
- {{ lidarr_media }}:/music #optional
- {{ lidarr_downloads }}:/downloads #optional
ports:
- {{ lidarr_port }}:8686
labels:
- "traefik.enable=true"
- "traefik.http.routers.{{lidarr_host}}.rule=Host(`{{ lidarr_host }}.{{ aya01_host }}.{{local_domain}}`)"
- "traefik.http.services.{{lidarr_host}}.loadbalancer.server.port={{ lidarr_port }}"
prowlarr:
image: lscr.io/linuxserver/prowlarr:latest
container_name: prowlarr
restart: always
networks:
- net
environment:
- PUID={{ puid }}
- PGID={{ pgid }}
- TZ={{ timezone }}
volumes:
- {{ prowlarr_config }}:/config
ports:
- {{ prowlarr_port }}:9696
labels:
- "traefik.enable=true"
- "traefik.http.routers.{{prowlarr_host}}.rule=Host(`{{ prowlarr_host }}.{{ aya01_host }}.{{local_domain}}`)"
- "traefik.http.services.{{prowlarr_host}}.loadbalancer.server.port={{ prowlarr_port }}"
networks: networks:
zoneminder: zoneminder:
driver: bridge driver: bridge