add mylar to role

This commit is contained in:
PurpleNinja225 2021-02-05 00:31:32 -09:00
parent 871bf8f3b1
commit 39c917180c
4 changed files with 32 additions and 21 deletions

View file

@ -30,7 +30,6 @@ jellyfin_enabled: false
youtubedlmaterial_enabled: false
mylar_enabled: false
# Music
mymediaforalexa_enabled: false
@ -312,18 +311,6 @@ tautulli_user_id: "0"
tautulli_group_id: "0"
tautulli_port: "8185"
###
### Mylar
###
mylar_available_externally: "false"
mylar_data_directory: "{{ docker_home }}/mylar"
mylar_comics_directory: "{{ comics_root }}"
mylar_downloads_directory: "{{ downloads_root }}"
mylar_port_http: "8585"
mylar_user_id: "0"
mylar_group_id: "0"
###
### YouTubeDL-Material
###

View file

@ -103,6 +103,11 @@
- lidarr
when: (lidarr_enabled | default(False))
- role: mylar
tags:
- mylar
when: (mylar_enabled | default(False))
- role: n8n
tags:
- n8n_enabled
@ -205,10 +210,6 @@
when: (thelounge_enabled | default(False))
tags: thelounge
- import_tasks: tasks/mylar.yml
when: (mylar_enabled | default(False))
tags: mylar
- import_tasks: tasks/glances.yml
when: (glances_enabled | default(False))
tags: glances

View file

@ -0,0 +1,21 @@
---
# enable or disable the application
mylar_enabled: false
mylar_available_externally: "false"
# directories
mylar_data_directory: "{{ docker_home }}/mylar"
mylar_comics_directory: "{{ comics_root }}"
mylar_downloads_directory: "{{ downloads_root }}"
# uid / gid
mylar_user_id: "0"
mylar_group_id: "0"
# network
mylar_hostname: "mylar"
mylar_port_http: "8585"
# specs
mylar_memory: "1g"

View file

@ -1,12 +1,13 @@
---
- name: Create Mylar Directory
- name: Create Mylar Directories
file:
path: "{{ item }}"
state: directory
# mode: 0755
with_items:
- "{{ mylar_data_directory }}/config"
- name: Mylar
- name: mylar Docker Container
docker_container:
name: mylar
image: linuxserver/mylar
@ -15,6 +16,7 @@
- "{{ mylar_comics_directory }}:/comics:rw"
- "{{ mylar_downloads_directory }}:/downloads:rw"
- "{{ mylar_data_directory }}/config:/config:rw"
network_mode: "bridge"
ports:
- "{{ mylar_port_http }}:8090"
env:
@ -22,10 +24,10 @@
PUID: "{{ mylar_user_id }}"
PGID: "{{ mylar_group_id }}"
restart_policy: unless-stopped
memory: 1g
memory: "{{ mylar_memory }}"
labels:
traefik.enable: "{{ mylar_available_externally }}"
traefik.http.routers.mylar.rule: "Host(`mylar.{{ ansible_nas_domain }}`)"
traefik.http.routers.mylar.rule: "Host(`{{ mylar_hostname }}.{{ ansible_nas_domain }}`)"
traefik.http.routers.mylar.tls.certresolver: "letsencrypt"
traefik.http.routers.mylar.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.mylar.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"