navidrome: also use systemd override

This commit is contained in:
dogeystamp 2023-06-27 14:53:13 -04:00
parent daee2706a4
commit 5c73830cb4
Signed by: dogeystamp
GPG Key ID: 7225FE3592EFFA38
2 changed files with 23 additions and 6 deletions

View File

@ -73,12 +73,23 @@
line: "Environment=HOME={{ dataroot }}/navidrome/"
notify: Run daemon-reload for Navidrome
- name: Allow Navidrome to write in data directory
lineinfile:
dest: /usr/lib/systemd/system/navidrome.service
regexp: "^ReadWritePaths=.*"
line: "ReadWritePaths={{ dataroot }}/navidrome/"
notify: Run daemon-reload for Navidrome
- name: Create systemd override dir
file:
path: /etc/systemd/system/navidrome.service.d/
state: directory
owner: root
group: root
mode: 0755
- name: Deploy systemd override conf
template:
src: navidrome.service.j2
dest: /etc/systemd/system/navidrome.service.d/override.conf
owner: root
group: root
mode: 0644
notify:
- Run daemon-reload for Navidrome
- name: Configure Navidrome
template:

View File

@ -0,0 +1,6 @@
[Service]
ReadWritePaths={{ dataroot }}/navidrome/
CPUWeight=20
CPUQuota=85%
IOWeight=20
MemorySwapMax=0