2021-05-12 17:15:08 +02:00
|
|
|
- name: Update beets configuration file
|
|
|
|
template:
|
|
|
|
src: beets_config.yaml.j2
|
|
|
|
dest: "{{ beets_config_folder }}/config.yaml"
|
2021-05-12 18:45:18 +02:00
|
|
|
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
|
|
|
|
|
2021-05-12 19:21:12 +02:00
|
|
|
- name: Tag music (auto-tag when confidence > 90%, use as-is otherwise)
|
2021-05-12 18:45:18 +02:00
|
|
|
# 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
|
2021-10-13 17:53:07 +02:00
|
|
|
cmd: "beet -c {{ beets_config_folder }}/config.yaml import -q {{ deemix_songs_path }}"
|
2021-05-12 18:45:18 +02:00
|
|
|
|
|
|
|
- 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 }}"
|
2021-10-19 20:45:04 +02:00
|
|
|
|
2021-05-12 18:45:18 +02:00
|
|
|
- name: Delete files once imported
|
|
|
|
shell:
|
|
|
|
cmd: "rm -rf {{ funkwhale_import_music_directory_host }}/*"
|
2021-05-12 19:20:08 +02:00
|
|
|
warn: false
|