From 88604efebbf8f6ff0eba700a68ed1a4cb884527b Mon Sep 17 00:00:00 2001 From: PurpleNinja225 Date: Fri, 5 Feb 2021 22:33:05 -0900 Subject: [PATCH 1/3] mv mymediaforalexa to roles --- group_vars/all.yml | 9 --------- nas.yml | 9 +++++---- roles/mymediaforalexa/defaults/main.yml | 9 +++++++++ .../mymediaforalexa/tasks/main.yml | 11 ++++++----- 4 files changed, 20 insertions(+), 18 deletions(-) create mode 100644 roles/mymediaforalexa/defaults/main.yml rename tasks/mymediaforalexa.yml => roles/mymediaforalexa/tasks/main.yml (71%) diff --git a/group_vars/all.yml b/group_vars/all.yml index ea422fcb..39327b48 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 @@ -428,12 +425,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 b3d30af3..62650d5b 100644 --- a/nas.yml +++ b/nas.yml @@ -113,6 +113,11 @@ - mylar when: (mylar_enabled | default(False)) + - role: mymediaforalexa + tags: + - mymediaforalexa + when: (mymediaforalexa_enabled | default(False)) + - role: n8n tags: - n8n_enabled @@ -247,10 +252,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..f4ca0800 --- /dev/null +++ b/roles/mymediaforalexa/defaults/main.yml @@ -0,0 +1,9 @@ +--- +# 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 71% rename from tasks/mymediaforalexa.yml rename to roles/mymediaforalexa/tasks/main.yml index 6bddb54e..a896a034 100644 --- a/tasks/mymediaforalexa.yml +++ b/roles/mymediaforalexa/tasks/main.yml @@ -1,12 +1,14 @@ -- name: Create mymedia for alexa Directories +--- +- name: Create Mymediaforalexa Directories file: path: "{{ item }}" state: directory + # mode: 0755 with_items: - "{{ mymediaforalexa_media_directory }}" - "{{ mymediaforalexa_data_directory }}" -- name: mymedia for alexa Docker Container +- name: mymediaforalexa Docker Container docker_container: name: mymediaforalexa image: bizmodeller/mymediaforalexa @@ -14,7 +16,6 @@ volumes: - "{{ mymediaforalexa_media_directory }}:/medialibrary:rw" - "{{ mymediaforalexa_data_directory }}:/datadir:rw" - network_mode: host + network_mode: "host" restart_policy: unless-stopped - memory: 1g - + memory: "{{ mymediaforalexa_memory }}" From f97dbf5f41dc996e1a660c7769a6c7741cd21417 Mon Sep 17 00:00:00 2001 From: David Stephens Date: Tue, 9 Feb 2021 22:18:26 +0000 Subject: [PATCH 2/3] Update main.yml --- roles/mymediaforalexa/defaults/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/mymediaforalexa/defaults/main.yml b/roles/mymediaforalexa/defaults/main.yml index f4ca0800..048b4010 100644 --- a/roles/mymediaforalexa/defaults/main.yml +++ b/roles/mymediaforalexa/defaults/main.yml @@ -1,6 +1,7 @@ --- # enable or disable the application mymediaforalexa_enabled: false + # directories mymediaforalexa_media_directory: "{{ music_root }}" mymediaforalexa_data_directory: "{{ docker_home }}/mymediaforalexa" From 06adce6fc2e539a8d3c834b25d910c44941a77c0 Mon Sep 17 00:00:00 2001 From: David Stephens Date: Tue, 9 Feb 2021 22:23:05 +0000 Subject: [PATCH 3/3] Update main.yml --- roles/mymediaforalexa/tasks/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/roles/mymediaforalexa/tasks/main.yml b/roles/mymediaforalexa/tasks/main.yml index a896a034..57ee1d19 100644 --- a/roles/mymediaforalexa/tasks/main.yml +++ b/roles/mymediaforalexa/tasks/main.yml @@ -3,7 +3,6 @@ file: path: "{{ item }}" state: directory - # mode: 0755 with_items: - "{{ mymediaforalexa_media_directory }}" - "{{ mymediaforalexa_data_directory }}" @@ -16,6 +15,6 @@ volumes: - "{{ mymediaforalexa_media_directory }}:/medialibrary:rw" - "{{ mymediaforalexa_data_directory }}:/datadir:rw" - network_mode: "host" + network_mode: host restart_policy: unless-stopped memory: "{{ mymediaforalexa_memory }}"