diff --git a/group_vars/all.yml b/group_vars/all.yml index 4210ef54..481b4d0d 100644 --- a/group_vars/all.yml +++ b/group_vars/all.yml @@ -30,9 +30,6 @@ jellyfin_enabled: false youtubedlmaterial_enabled: false -# Music -mymediaforalexa_enabled: false - # News miniflux_enabled: false @@ -405,12 +402,6 @@ get_iplayer_config_directory: "{{ docker_home }}/get_iplayer" get_iplayer_download_directory: "{{ tv_root }}/iplayer_downloads" get_iplayer_port: "8182" -### -### mymediaforalexa -### -mymediaforalexa_media_directory: "{{ music_root }}" -mymediaforalexa_data_directory: "{{ docker_home }}/mymediaforalexa" - ### ### Jackett ### diff --git a/nas.yml b/nas.yml index ae928659..d4c2eb63 100644 --- a/nas.yml +++ b/nas.yml @@ -118,6 +118,11 @@ - mylar when: (mylar_enabled | default(False)) + - role: mymediaforalexa + tags: + - mymediaforalexa + when: (mymediaforalexa_enabled | default(False)) + - role: n8n tags: - n8n_enabled @@ -253,10 +258,6 @@ when: (get_iplayer_enabled | default(False)) tags: get_iplayer - - import_tasks: tasks/mymediaforalexa.yml - when: (mymediaforalexa_enabled | default(False)) - tags: mymediaforalexa - - import_tasks: tasks/jackett.yml when: (jackett_enabled | default(False)) tags: jackett diff --git a/roles/mymediaforalexa/defaults/main.yml b/roles/mymediaforalexa/defaults/main.yml new file mode 100644 index 00000000..048b4010 --- /dev/null +++ b/roles/mymediaforalexa/defaults/main.yml @@ -0,0 +1,10 @@ +--- +# enable or disable the application +mymediaforalexa_enabled: false + +# directories +mymediaforalexa_media_directory: "{{ music_root }}" +mymediaforalexa_data_directory: "{{ docker_home }}/mymediaforalexa" + +# specs +mymediaforalexa_memory: "1g" diff --git a/tasks/mymediaforalexa.yml b/roles/mymediaforalexa/tasks/main.yml similarity index 77% rename from tasks/mymediaforalexa.yml rename to roles/mymediaforalexa/tasks/main.yml index 6bddb54e..57ee1d19 100644 --- a/tasks/mymediaforalexa.yml +++ b/roles/mymediaforalexa/tasks/main.yml @@ -1,4 +1,5 @@ -- name: Create mymedia for alexa Directories +--- +- name: Create Mymediaforalexa Directories file: path: "{{ item }}" state: directory @@ -6,7 +7,7 @@ - "{{ mymediaforalexa_media_directory }}" - "{{ mymediaforalexa_data_directory }}" -- name: mymedia for alexa Docker Container +- name: mymediaforalexa Docker Container docker_container: name: mymediaforalexa image: bizmodeller/mymediaforalexa @@ -16,5 +17,4 @@ - "{{ mymediaforalexa_data_directory }}:/datadir:rw" network_mode: host restart_policy: unless-stopped - memory: 1g - + memory: "{{ mymediaforalexa_memory }}"