ansible/roles/music/tasks/download_music.yml

30 lines
830 B
YAML
Raw Normal View History

2021-10-13 17:53:07 +02:00
- name: Update deemix configuration file
2021-05-12 17:13:33 +02:00
template:
2021-10-13 17:53:07 +02:00
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"
2021-05-12 17:13:33 +02:00
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-10-13 17:53:07 +02:00
cmd: "deemix --portable -p {{ deemix_songs_path }} {{ item }}"
chdir: "{{ deemix_folder_path }}"
2021-05-12 17:13:33 +02:00
with_items: "{{ lookup('file', 'files/albums.txt').splitlines() }}"
2021-10-13 17:53:07 +02:00
register: output_deemix
- name: Show download state
debug:
2021-10-13 17:53:07 +02:00
msg: "{{ output_deemix }}"