Files
homelab/tasks/plex.yml
Alex Frantz 242378f0c7
All checks were successful
Deploy Containers / Prepare (push) Successful in 1m13s
clean up traefik
2025-09-12 01:08:28 -04:00

33 lines
710 B
YAML

---
- name: Create folder structure
file:
path: "{{ item }}"
state: directory
with_items:
- "{{ data_dir }}/plex"
- name: Pull latest Plex Docker Image
docker_image:
name: lscr.io/linuxserver/plex
tag: latest
source: pull
- name: Deploy Plex Docker Container
docker_container:
name: plex
image: lscr.io/linuxserver/plex
network_mode: host
restart_policy: unless-stopped
recreate: true
devices:
- /dev/dri:/dev/dri
env:
PUID: "{{ PUID }}"
PGID: "{{ PGID }}"
TZ: "{{ TZ }}"
VERSION: "docker"
PLEX_CLAIM: "{{ PLEX_CLAIM_TOKEN }}"
volumes:
- "{{ data_dir }}/plex:/config"
- "{{ media_path }}:/media"