2018-09-22 23:58:59 +00:00
|
|
|
- name: Create Plex Directories
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
# mode: 0755
|
|
|
|
with_items:
|
|
|
|
- "{{ plex_config_directory }}"
|
2020-01-05 20:08:59 +00:00
|
|
|
- "{{ plex_logs }}"
|
2018-09-22 23:58:59 +00:00
|
|
|
|
|
|
|
- name: plex Docker Container
|
|
|
|
docker_container:
|
|
|
|
name: plex
|
|
|
|
image: linuxserver/plex
|
|
|
|
pull: true
|
|
|
|
volumes:
|
|
|
|
- "{{ plex_config_directory }}:/config:rw"
|
2020-01-05 20:08:59 +00:00
|
|
|
- "{{ plex_logs }}:/opt/plex/Library/Application Support/Plex Media Server/Logs:rw"
|
2019-04-02 11:29:48 +00:00
|
|
|
- "{{ plex_movies_directory }}:/movies:{{ plex_movies_permissions }}"
|
|
|
|
- "{{ plex_tv_directory }}:/tv:{{ plex_tv_permissions }}"
|
2019-11-02 03:43:42 +00:00
|
|
|
- "{{ plex_photos_directory }}:/photos:{{ plex_photos_permissions }}"
|
2020-04-22 03:56:52 +00:00
|
|
|
- "{{ plex_podcasts_directory }}:/podcasts:{{ plex_podcasts_permissions }}"
|
2019-08-26 04:26:19 +00:00
|
|
|
- "{{ plex_music_directory }}:/music:{{ plex_music_permissions }}"
|
2018-09-22 23:58:59 +00:00
|
|
|
network_mode: "host"
|
|
|
|
env:
|
2018-11-12 22:30:13 +00:00
|
|
|
TZ: "{{ ansible_nas_timezone }}"
|
2018-09-22 23:58:59 +00:00
|
|
|
PUID: "{{ plex_user_id }}"
|
|
|
|
PGID: "{{ plex_group_id }}"
|
|
|
|
restart_policy: unless-stopped
|
2020-04-16 05:57:34 +00:00
|
|
|
memory: 2g
|
2019-04-11 22:03:11 +00:00
|
|
|
labels:
|
|
|
|
traefik.backend: "plex"
|
|
|
|
traefik.frontend.rule: "Host:plex.{{ ansible_nas_domain }}"
|
|
|
|
traefik.enable: "{{ plex_available_externally }}"
|
|
|
|
traefik.port: "32400"
|