mirror of
https://github.com/davestephens/ansible-nas
synced 2024-12-25 11:03:07 +00:00
39 lines
1.3 KiB
YAML
39 lines
1.3 KiB
YAML
---
|
|
- name: PyTivo - create config directory
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
mode: 0777
|
|
with_items:
|
|
- "{{ pytivo_config_directory }}"
|
|
|
|
- name: PyTivo - install Docker container
|
|
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"
|
|
- "{{ pytivo_movies_directory }}:/movies:ro"
|
|
- "{{ pytivo_tv_directory }}:/tv:ro"
|
|
- "{{ pytivo_photos_directory }}:/photos:ro"
|
|
- "{{ pytivo_music_directory }}:/music:ro"
|
|
- "{{ pytivo_podcasts_directory }}:/podcasts:ro"
|
|
network_mode: "host"
|
|
env:
|
|
TZ: "{{ ansible_nas_timezone }}"
|
|
PUID: "{{ pytivo_user_id }}"
|
|
PGID: "{{ pytivo_group_id }}"
|
|
restart_policy: unless-stopped
|
|
memory: 1g
|
|
labels:
|
|
traefik.enable: "{{ pytivo_available_externally }}"
|
|
traefik.http.routers.pytivo.rule: "Host(`pytivo.{{ 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"
|