mirror of
https://github.com/davestephens/ansible-nas
synced 2025-01-12 11:38:47 +00:00
Merge branch 'mv-youtubedlmaterial-to-roles' of https://github.com/PurpleNinja225/NASible into PurpleNinja225-mv-youtubedlmaterial-to-roles
* 'mv-youtubedlmaterial-to-roles' of https://github.com/PurpleNinja225/NASible: fix formatting mv youtubedlmaterial to roles
This commit is contained in:
commit
d03b5a8fed
4 changed files with 30 additions and 21 deletions
|
@ -16,9 +16,6 @@
|
||||||
### Ansible-NAS Applications
|
### Ansible-NAS Applications
|
||||||
###
|
###
|
||||||
|
|
||||||
# Media Sourcing
|
|
||||||
youtubedlmaterial_enabled: false
|
|
||||||
|
|
||||||
# System Management
|
# System Management
|
||||||
stats_enabled: false
|
stats_enabled: false
|
||||||
guacamole_enabled: false
|
guacamole_enabled: false
|
||||||
|
@ -244,15 +241,6 @@ joomla_database_password: top_secret
|
||||||
joomla_port: "8181"
|
joomla_port: "8181"
|
||||||
|
|
||||||
###
|
###
|
||||||
### YouTubeDL-Material
|
|
||||||
###
|
|
||||||
youtubedlmaterial_available_externally: "false"
|
|
||||||
youtubedlmaterial_data_directory: "{{ docker_home }}/youtubedlmaterial"
|
|
||||||
youtubedlmaterial_dl_audio_directory: "{{ downloads_root }}/youtube/audio"
|
|
||||||
youtubedlmaterial_dl_video_directory: "{{ downloads_root }}/youtube/video"
|
|
||||||
youtubedlmaterial_dl_subscriptions_directory: "{{ downloads_root }}/youtube/subscriptions"
|
|
||||||
youtubedlmaterial_port_http: "8998"
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### OpenVPN
|
### OpenVPN
|
||||||
###
|
###
|
||||||
|
|
9
nas.yml
9
nas.yml
|
@ -318,6 +318,11 @@
|
||||||
- traefik
|
- traefik
|
||||||
when: (traefik_enabled | default(False))
|
when: (traefik_enabled | default(False))
|
||||||
|
|
||||||
|
- role: youtubedlmaterial
|
||||||
|
tags:
|
||||||
|
- youtubedlmaterial
|
||||||
|
when: (youtubedlmaterial_enabled | default(False))
|
||||||
|
|
||||||
- role: watchtower
|
- role: watchtower
|
||||||
tags:
|
tags:
|
||||||
- watchtower
|
- watchtower
|
||||||
|
@ -369,10 +374,6 @@
|
||||||
when: (ubooquity_enabled | default(False))
|
when: (ubooquity_enabled | default(False))
|
||||||
tags: ubooquity
|
tags: ubooquity
|
||||||
|
|
||||||
- import_tasks: tasks/youtubedlmaterial.yml
|
|
||||||
when: (youtubedlmaterial_enabled | default(False))
|
|
||||||
tags: youtubedlmaterial
|
|
||||||
|
|
||||||
- import_tasks: tasks/virtual_desktop.yml
|
- import_tasks: tasks/virtual_desktop.yml
|
||||||
when: (virtual_desktop_enabled | default(False))
|
when: (virtual_desktop_enabled | default(False))
|
||||||
tags: virtual_desktop
|
tags: virtual_desktop
|
||||||
|
|
18
roles/youtubedlmaterial/defaults/main.yml
Normal file
18
roles/youtubedlmaterial/defaults/main.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
# enable or disable the application
|
||||||
|
youtubedlmaterial_enabled: false
|
||||||
|
youtubedlmaterial_available_externally: "false"
|
||||||
|
|
||||||
|
# directories
|
||||||
|
youtubedlmaterial_data_directory: "{{ docker_home }}/youtubedlmaterial"
|
||||||
|
youtubedlmaterial_dl_audio_directory: "{{ downloads_root }}/youtube/audio"
|
||||||
|
youtubedlmaterial_dl_video_directory: "{{ downloads_root }}/youtube/video"
|
||||||
|
youtubedlmaterial_dl_subscriptions_directory: "{{ downloads_root }}/youtube/subscriptions"
|
||||||
|
|
||||||
|
|
||||||
|
# network
|
||||||
|
youtubedlmaterial_hostname: "youtubedlmaterial"
|
||||||
|
youtubedlmaterial_port_http: "8998"
|
||||||
|
|
||||||
|
# specs
|
||||||
|
youtubedlmaterial_memory: "1g"
|
|
@ -1,8 +1,9 @@
|
||||||
---
|
---
|
||||||
- name: YouTubeDL-Material Directory
|
- name: Create Youtubedlmaterial Directories
|
||||||
file:
|
file:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
state: directory
|
state: directory
|
||||||
|
# mode: 0755
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ youtubedlmaterial_data_directory }}/appdata"
|
- "{{ youtubedlmaterial_data_directory }}/appdata"
|
||||||
- "{{ youtubedlmaterial_data_directory }}/audio"
|
- "{{ youtubedlmaterial_data_directory }}/audio"
|
||||||
|
@ -12,7 +13,7 @@
|
||||||
- "{{ youtubedlmaterial_dl_video_directory }}"
|
- "{{ youtubedlmaterial_dl_video_directory }}"
|
||||||
- "{{ youtubedlmaterial_dl_subscriptions_directory }}"
|
- "{{ youtubedlmaterial_dl_subscriptions_directory }}"
|
||||||
|
|
||||||
- name: YouTubeDL-Material Docker Container
|
- name: youtubedlmaterial Docker Container
|
||||||
docker_container:
|
docker_container:
|
||||||
name: youtubedlmaterial
|
name: youtubedlmaterial
|
||||||
image: tzahi12345/youtubedl-material:latest
|
image: tzahi12345/youtubedl-material:latest
|
||||||
|
@ -22,16 +23,17 @@
|
||||||
- "{{ youtubedlmaterial_dl_audio_directory }}:/app/audio:rw"
|
- "{{ youtubedlmaterial_dl_audio_directory }}:/app/audio:rw"
|
||||||
- "{{ youtubedlmaterial_dl_video_directory }}:/app/video:rw"
|
- "{{ youtubedlmaterial_dl_video_directory }}:/app/video:rw"
|
||||||
- "{{ youtubedlmaterial_dl_subscriptions_directory }}:/app/subscriptions:rw"
|
- "{{ youtubedlmaterial_dl_subscriptions_directory }}:/app/subscriptions:rw"
|
||||||
|
network_mode: "bridge"
|
||||||
ports:
|
ports:
|
||||||
- "{{ youtubedlmaterial_port_http }}:17442"
|
- "{{ youtubedlmaterial_port_http }}:17442"
|
||||||
env:
|
env:
|
||||||
ALLOW_CONFIG_MUTATIONS: "true"
|
ALLOW_CONFIG_MUTATIONS: "true"
|
||||||
TZ: "{{ ansible_nas_timezone }}"
|
TZ: "{{ ansible_nas_timezone }}"
|
||||||
restart_policy: always
|
restart_policy: unless-stopped
|
||||||
memory: 1g
|
memory: "{{ youtubedlmaterial_memory }}"
|
||||||
labels:
|
labels:
|
||||||
traefik.enable: "{{ youtubedlmaterial_available_externally }}"
|
traefik.enable: "{{ youtubedlmaterial_available_externally }}"
|
||||||
traefik.http.routers.youtubedlmaterial.rule: "Host(`youtubedlmaterial.{{ ansible_nas_domain }}`)"
|
traefik.http.routers.youtubedlmaterial.rule: "Host(`{{ youtubedlmaterial_hostname }}.{{ ansible_nas_domain }}`)"
|
||||||
traefik.http.routers.youtubedlmaterial.tls.certresolver: "letsencrypt"
|
traefik.http.routers.youtubedlmaterial.tls.certresolver: "letsencrypt"
|
||||||
traefik.http.routers.youtubedlmaterial.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
traefik.http.routers.youtubedlmaterial.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
||||||
traefik.http.routers.youtubedlmaterial.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
traefik.http.routers.youtubedlmaterial.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
Loading…
Reference in a new issue