move pytivo to roles

This commit is contained in:
PurpleNinja225 2021-02-05 14:58:38 -09:00
parent 3645e1ac29
commit 002e97e07b
4 changed files with 31 additions and 30 deletions

View file

@ -74,10 +74,6 @@ ubooquity_enabled: false
# Joomla
joomla_enabled: false
# PyTivo
pytivo_enabled: false
###
### General
###
@ -278,19 +274,6 @@ pyload_user_id: "0"
pyload_group_id: "0"
pyload_port: "8000"
###
### PyTivo
###
pytivo_available_externally: "false"
pytivo_config_directory: "{{ docker_home }}/pytivo/config"
pytivo_movies_directory: "{{ movies_root }}"
pytivo_tv_directory: "{{ tv_root }}"
pytivo_photos_directory: "{{ photos_root }}"
pytivo_music_directory: "{{ music_root }}"
pytivo_podcasts_directory: "{{ podcasts_root }}"
pytivo_user_id: "0"
pytivo_group_id: "0"
###
### Homebridge
###

11
nas.yml
View file

@ -148,6 +148,11 @@
- plex
when: (plex_enabled | default(False))
- role: pytivo
tags:
- pytivo
when: (pytivo_enabled | default(False))
- role: radarr
tags:
- radarr
@ -305,8 +310,4 @@
- import_tasks: tasks/virtual_desktop.yml
when: (virtual_desktop_enabled | default(False))
tags: virtual_desktop
- import_tasks: tasks/pytivo.yml
when: (pytivo_enabled | default(False))
tags: pytivo
tags: virtual_desktop

View file

@ -0,0 +1,18 @@
---
pytivo_enabled: false
pytivo_available_externally: "false"
# directories
pytivo_config_directory: "{{ docker_home }}/pytivo/config"
pytivo_movies_directory: "{{ movies_root }}"
pytivo_tv_directory: "{{ tv_root }}"
pytivo_photos_directory: "{{ photos_root }}"
pytivo_music_directory: "{{ music_root }}"
pytivo_podcasts_directory: "{{ podcasts_root }}"
# uid / gid
pytivo_user_id: "0"
pytivo_group_id: "0"
# network
pytivo_hostname: "pytivo"

View file

@ -1,5 +1,5 @@
---
- name: PyTivo - create config directory
- name: Create Pytivo Directories
file:
path: "{{ item }}"
state: directory
@ -7,14 +7,11 @@
with_items:
- "{{ pytivo_config_directory }}"
- name: PyTivo - install Docker container
- name: Pytivo
docker_container:
name: pytivo
image: pinion/docker-pytivo
pull: true
ports:
- "9032:9032"
- "2190:2190/udp"
volumes:
- "/etc/localtime:/etc/localtime:ro"
- "{{ pytivo_config_directory }}:/config:rw"
@ -23,7 +20,9 @@
- "{{ pytivo_photos_directory }}:/photos:ro"
- "{{ pytivo_music_directory }}:/music:ro"
- "{{ pytivo_podcasts_directory }}:/podcasts:ro"
network_mode: "host"
ports:
- "9032:9032"
- "2190:2190/udp"
env:
TZ: "{{ ansible_nas_timezone }}"
PUID: "{{ pytivo_user_id }}"
@ -32,8 +31,8 @@
memory: 1g
labels:
traefik.enable: "{{ pytivo_available_externally }}"
traefik.http.routers.pytivo.rule: "Host(`pytivo.{{ ansible_nas_domain }}`)"
traefik.http.routers.pytivo.rule: "Host(`{{ pytivo_hostname }}.{{ ansible_nas_domain }}`)"
traefik.http.routers.pytivo.tls.certresolver: "letsencrypt"
traefik.http.routers.pytivo.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.pytivo.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
traefik.http.services.pytivo.loadbalancer.server.port: "9032"
traefik.http.services.pytivo.loadbalancer.server.port: "9032"