forked from lokenx/plexrequests-meteor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.yml
68 lines (64 loc) · 2 KB
/
main.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
#!/bin/bash
#
# [Ansible Role]
# This Project
# GitHub: https://github.com/albatross1/plexrequests-meteor/
# Author: albatross1 aka Wade Wilson
#
# GitHub: https://github.com/Admin9705/PlexGuide.com-The-Awesome-Plex-Server
# Author: Admin9705 & Deiteq & FlickerRate
# URL: https://plexguide.com
#
# PlexGuide Copyright (C) 2018 PlexGuide.com
# Licensed under GNU General Public License v3.0 GPL-3 (in short)
#
# You may copy, distribute and modify the software as long as you track
# changes/dates in source files. Any modifications to our software
# including (via compiler) GPL-licensed code must also be made available
# under the GPL along with build & install instructions.
#
#################################################################################
---
- include_role:
name: variables
########## Unique for TLD
- name: Register TLD if it exists
shell: "cat /var/plexguide/tld.{{ role_name }}"
register: tld
ignore_errors: True
##########
- name: Remove PlexRequests Container
docker_container:
name: PlexRequests
state: absent
############ Directories
- name: Create Basic Directories
file: "path={{item}} state=directory mode=0775 owner=1000 group=1000 recurse=true"
with_items:
- /opt/appdata/plexrequests
- name: Deploy PlexRequests Container
docker_container:
name: PlexRequests
## image: lokenx/plexrequests-meteor
image: lokenx/plexrequests-meteor
pull: yes
cpu_shares: 128
published_ports:
- "{{ports.stdout}}3000:3000"
env:
PUID: "1000"
PGID: "1000"
volumes:
- /opt/appdata/plexrequests:/config
- /etc/localtime:/etc/localtime:ro
networks:
- name: plexguide
aliases:
- plexrequests
restart_policy: always
state: started
labels:
traefik.enable: "true"
traefik.frontend.redirect.entryPoint: "https"
traefik.frontend.rule: "Host:plexrequest.{{domain.stdout}},requests.{{domain.stdout}},request.{{domain.stdout}}{{tld.stdout}}"
traefik.port: "3000"