make album download work

master
Quentin Duchemin 2021-05-12 17:13:33 +02:00
parent d41d0f2d7d
commit 410ce50a59
Signed by: Chosto
GPG Key ID: 0547178FEEDE7D6B
7 changed files with 30 additions and 32 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
.vault_password
albums.txt

18
all.yml
View File

@ -3,23 +3,17 @@
become: yes
roles:
- role: base
tags:
- base
tags: base
- role: cron
tags:
- cron
tags: cron
- role: ufw
tags:
- ufw
tags: ufw
- role: fail2ban
tags:
- fail2ban
tags: fail2ban
- role: node-exporter
tags:
- node-exporter
tags: node-exporter
- role: docker
tags:
- docker
tags: docker
- role: traefik
tags:
- docker

View File

@ -6,23 +6,27 @@
include_role:
name: music
tasks_from: download_music_requirements
tags:
- requirements
apply:
tags: requirements
tags: requirements
- name: Install and configure Funkwhale
include_role:
name: music
tasks_from: funkwhale
tags:
- install
apply:
tags: install
tags: install
- name: Download submitted list of albums
include_role:
name: music
tasks_from: download_music
tags:
- download
apply:
tags: download
tags: download
- name: Import music into Funkwhale
include_role:
name: music
tasks_from: import_music
tags:
- import
apply:
tags: import
tags: import

View File

@ -1 +0,0 @@
https://www.deezer.com/fr/album/42024091

View File

@ -1,8 +1,16 @@
- 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
shell:
argv: "deez-dw.py --recursive_download True --recursive_quality True --output {{ deezloader_songs_path }} --not_gui False --link {{ item }}"
cmd: "deez-dw.py --recursive_download True --recursive_quality True --output {{ deezloader_songs_path }} --not_gui False --link {{ item }}"
chdir: "{{ deezloader_folder_path }}"
with_lines: "cat files/albums.txt"
with_items: "{{ lookup('file', 'files/albums.txt').splitlines() }}"
register: output_deezloader
- name: Show download state

View File

@ -19,14 +19,6 @@
- "{{ deezloader_songs_path }}"
- "{{ beets_config_folder }}"
- name: Update deezloader configuration file
template:
src: deezloader_settings.ini.j2
dest: "{{ deezloader_folder_path }}/settings.ini"
owner: "{{ base_user_name }}"
group: "{{ base_user_name }}"
mode: 0644
- name: Update beets configuration file
template:
src: beets_config.yaml.j2

View File

@ -7,7 +7,7 @@
group: "{{ base_user_name }}"
mode: 0755
- name: Copy Traefik templates (nginx conf and Compose)
- name: Copy Funkwhale templates (nginx conf and Compose)
template:
src: "{{ item }}"
# Remove .j2 extension