ansible/roles/music/tasks/download_music.yml

30 lines
830 B
YAML

- name: Update deemix configuration file
template:
src: deemix_config.json.j2
dest: "{{ deemix_folder_path }}/config/config.json"
owner: "{{ base_user_name }}"
group: "{{ base_user_name }}"
mode: 0644
- name: Update ARL token file
template:
src: arl.j2
dest: "{{ deemix_folder_path }}/config/.arl"
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:
cmd: "deemix --portable -p {{ deemix_songs_path }} {{ item }}"
chdir: "{{ deemix_folder_path }}"
with_items: "{{ lookup('file', 'files/albums.txt').splitlines() }}"
register: output_deemix
- name: Show download state
debug:
msg: "{{ output_deemix }}"