ansible/roles/music/tasks/download_music.yml

22 lines
734 B
YAML
Raw Normal View History

2021-05-12 17:13:33 +02:00
- name: Update deezloader configuration file
template:
src: deezloader_settings.ini.j2
dest: "{{ deezloader_folder_path }}/setting.ini"
owner: "{{ base_user_name }}"
group: "{{ base_user_name }}"
mode: 0644
- name: Download required albums
# So that files are written with base user perms
become: yes
become_user: "{{ base_user_name }}"
shell:
2021-05-12 17:13:33 +02:00
cmd: "deez-dw.py --recursive_download True --recursive_quality True --output {{ deezloader_songs_path }} --not_gui False --link {{ item }}"
chdir: "{{ deezloader_folder_path }}"
2021-05-12 17:13:33 +02:00
with_items: "{{ lookup('file', 'files/albums.txt').splitlines() }}"
register: output_deezloader
- name: Show download state
debug:
msg: "{{ output_deezloader }}"