Merge branch 'PurpleNinja225-mv-pytivo-to-role'

* PurpleNinja225-mv-pytivo-to-role:
  move pytivo to roles
This commit is contained in:
David Stephens 2022-05-28 17:37:10 +01:00
commit b3167788f4
4 changed files with 30 additions and 30 deletions

View file

@ -48,10 +48,6 @@ ubooquity_enabled: false
# Joomla
joomla_enabled: false
# PyTivo
pytivo_enabled: false
###
### General
###
@ -248,20 +244,6 @@ joomla_available_externally: "false"
joomla_database_password: top_secret
joomla_port: "8181"
###
### 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"
###
### YouTubeDL-Material
###

View file

@ -263,6 +263,11 @@
- plex
when: (plex_enabled | default(False))
- role: pytivo
tags:
- pytivo
when: (pytivo_enabled | default(False))
- role: radarr
tags:
- radarr
@ -380,7 +385,3 @@
- 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

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"