ansible-nas/tasks/plex.yml

30 lines
794 B
YAML
Raw Normal View History

2018-09-22 23:58:59 +00:00
- name: Create Plex Directories
file:
path: "{{ item }}"
state: directory
# mode: 0755
with_items:
- "{{ plex_config_directory }}"
- name: plex Docker Container
docker_container:
name: plex
image: linuxserver/plex
pull: true
volumes:
- "{{ plex_config_directory }}:/config:rw"
- "{{ plex_movies_directory }}:/movies:rw"
- "{{ plex_tv_directory }}:/tv:rw"
network_mode: "host"
env:
TZ: "{{ ansible_nas_timezone }}"
2018-09-22 23:58:59 +00:00
PUID: "{{ plex_user_id }}"
PGID: "{{ plex_group_id }}"
restart_policy: unless-stopped
memory: 1g
labels:
traefik.backend: "plex"
traefik.frontend.rule: "Host:plex.{{ ansible_nas_domain }}"
traefik.enable: "{{ plex_available_externally }}"
traefik.port: "32400"