- 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: Filter non-existing albums shell: chdir: ~/documents/code/funkwhale-playlist-import cmd: ./exclude-existing-albums.py -s deezer > /tmp/unique_albums.txt stdin: "{{ lookup('file', 'files/albums.txt') }}" register: unique_albums delegate_to: localhost become: false - name: Download required albums # So that files are written with base user perms become: true become_user: "{{ base_user_name }}" shell: cmd: "deemix --portable -p {{ deemix_songs_path }} {{ item }}" chdir: "{{ deemix_folder_path }}" with_items: "{{ lookup('file', '/tmp/unique_albums.txt').splitlines() }}" register: output_deemix - name: Show download state debug: msg: "{{ output_deemix }}"