diff --git a/music.yml b/music.yml index 39965ed..f5c690b 100644 --- a/music.yml +++ b/music.yml @@ -2,14 +2,8 @@ - hosts: all become: yes tasks: - - name: Download and configure deezloader and beets - include_role: - name: music - tasks_from: download_music_requirements - apply: - tags: requirements tags: requirements - - name: Install and configure Funkwhale + - name: Install and configure Funkwhale, deezloader and beets include_role: name: music tasks_from: funkwhale diff --git a/roles/music/tasks/download_music_requirements.yml b/roles/music/tasks/download_music_requirements.yml deleted file mode 100644 index c39ac13..0000000 --- a/roles/music/tasks/download_music_requirements.yml +++ /dev/null @@ -1,25 +0,0 @@ -- name: Install deezloader and beets - pip: - name: "{{ item }}" - state: present - loop: - - deezloader - - beets - -- name: Create deezloader and beets directories - file: - path: "{{ item }}" - state: directory - owner: "{{ base_user_name }}" - group: "{{ base_user_name }}" - mode: 0755 - recurse: yes - loop: - - "{{ deezloader_folder_path }}" - - "{{ deezloader_songs_path }}" - - "{{ beets_config_folder }}" - -- name: Update beets configuration file - template: - src: beets_config.yaml.j2 - dest: "{{ beets_config_folder }}/config.yaml" diff --git a/roles/music/tasks/funkwhale.yml b/roles/music/tasks/funkwhale.yml index 9e2f3f7..094d1b4 100644 --- a/roles/music/tasks/funkwhale.yml +++ b/roles/music/tasks/funkwhale.yml @@ -1,4 +1,25 @@ --- +- name: Install deezloader and beets + pip: + name: "{{ item }}" + state: present + loop: + - deezloader + - beets + +- name: Create deezloader and beets directories + file: + path: "{{ item }}" + state: directory + owner: "{{ base_user_name }}" + group: "{{ base_user_name }}" + mode: 0755 + recurse: yes + loop: + - "{{ deezloader_folder_path }}" + - "{{ deezloader_songs_path }}" + - "{{ beets_config_folder }}" + - name: Create Funkwhale directory file: path: "{{ funkwhale_folder_name }}" diff --git a/roles/music/tasks/import_music.yml b/roles/music/tasks/import_music.yml index e69de29..161684d 100644 --- a/roles/music/tasks/import_music.yml +++ b/roles/music/tasks/import_music.yml @@ -0,0 +1,4 @@ +- name: Update beets configuration file + template: + src: beets_config.yaml.j2 + dest: "{{ beets_config_folder }}/config.yaml"