-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathplex.yml
104 lines (94 loc) · 3.42 KB
/
plex.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
---
- hosts: homelab
vars:
application: plex
plex_main_folder: "{{ config_directory }}/Library/Application Support/Plex Media Server"
docker_network: "{{ networks.pub }}"
handlers:
- name: Restart
community.docker.docker_container:
name: "{{ application }}"
restart: true
comparisons:
'*': ignore
tasks:
- name: Create config folder
ansible.builtin.file:
path: "{{ config_directory }}"
state: directory
owner: "{{ common_user }}"
group: "{{ common_root_group }}"
mode: "0771"
- name: "Create {{ application }} container"
ansible.builtin.include_role:
name: docker_container
vars:
image: plexinc/pms-docker:1.41.3.9314-a0bfb8370
ipv4_address: "{{ docker_network.prefix }}.253"
env:
PLEX_UID: "{{ common_user_id | string }}"
PLEX_GID: "{{ common_root_group | string }}"
TZ: "{{ common_timezone }}"
NVIDIA_VISIBLE_DEVICES: "all"
NVIDIA_DRIVER_CAPABILITIES: "all"
# PLEX_CLAIM: ""
volumes:
- "{{ config_directory }}:/config"
- "{{ common_directory_movies }}:/data/movies"
- "{{ common_directory_tv }}:/data/tv"
tmpfs:
- /transcode:rw,mode=01777
device_requests:
- driver: nvidia
count: -1
device_ids: []
options: {}
capabilities:
- - gpu
- video
- compute
- utility
traefik:
- port: 32400
blackbox:
path: /identity
homepage:
group: Plex
weight: 500
description: "Media server"
widget:
key: !vault |
$ANSIBLE_VAULT;1.1;AES256
65353937333862623062636536316239623834633562336666363231633961663237353238656563
6161353531656130353237623139336632653831623136350a356261316637666665353663383363
39333333306538613138653061346231623930613736616636633461313034633739343866303562
3361643763383065370a646134383364343363306262333261353339323739346139356530363065
66306230613030386561356532356262326434336231333863363061616231663064
fields: '["streams", "movies", "tv"]'
- name: Install Absolute Series Scanner
block:
- name: Setup Scanners/Series folder
ansible.builtin.file:
path: "{{ plex_main_folder }}/Scanners/Series"
state: directory
owner: "{{ common_user_id }}"
group: "{{ common_root_group }}"
mode: "0755"
register: _plex_scanner_series_folder
- name: Download Absolute Series Scanner
ansible.builtin.get_url:
url: https://raw.githubusercontent.com/ZeroQI/Absolute-Series-Scanner/master/Scanners/Series/Absolute%20Series%20Scanner.py
dest: "{{ _plex_scanner_series_folder.path }}/Absolute Series Scanner.py"
owner: "{{ common_user_id }}"
group: "{{ common_root_group }}"
mode: "0755"
notify: Restart
- name: Install HTTP Anidb Metadata Agent (HAMA)
ansible.builtin.git:
repo: https://github.com/ZeroQI/Hama.bundle.git
dest: "{{ plex_main_folder }}/Plug-ins/Hama.bundle"
version: master
update: true
become: false
become_user: "{{ common_user }}"
notify: Restart