- name: Update beets configuration file template: src: beets_config.yaml.j2 dest: "{{ beets_config_folder }}/config.yaml" owner: "{{ base_user_name }}" group: "{{ base_user_name }}" mode: 0644 - name: Make sure logs are writable file: path: "{{ beets_log_file }}" state: touch owner: "{{ base_user_name }}" group: "{{ base_user_name }}" mode: 0644 - name: Tag music (auto-tag when confidence > 90%, use as-is otherwise) # So that files are written with user perms become: yes become_user: "{{ base_user_name }}" shell: # Quiet mode = do not ask anything to the user # Default are in configuration file cmd: "beet -c {{ beets_config_folder }}/config.yaml import -q {{ deemix_songs_path }}" - name: Import music into Funkwhale shell: cmd: "docker-compose run --rm api python manage.py import_files {{ funkwhale_import_library_id }} {{ funkwhale_import_music_directory }} --recursive --noinput --prune" chdir: "{{ funkwhale_folder_name }}" - name: Run funkwhale import container community.docker.docker_compose: project_src: "{{ funkwhale_folder_name }}" files: ["import.yml"] remove_orphans: yes pull: yes recreate: smart state: present - name: Remove funkwhale import container community.docker.docker_compose: project_src: "{{ funkwhale_folder_name }}" files: ["import.yml"] state: absent - name: Delete files once imported shell: cmd: "rm -rf {{ funkwhale_import_music_directory_host }}/*" warn: false