4K: pre-create download-client completed category dirs in playbook
radarr-4k/sonarr-4k surfaced 'download client places downloads in X but it does not appear to exist' health errors: the SABnzbd (movies-4k/tv-4k) and Transmission (radarr-uhd/sonarr-uhd) completed-category dirs dont exist until the first grab lands in each category. On a rebuild those errors recur until downloads happen. Add an idempotent file: task creating all four at 1000:3000 (abc:media) 0775 to match the /data tree. Root cause of the original root:0770 drift on movies-4k: a manual docker exec <client> mkdir runs as ROOT in linuxserver images (umask 007), not as the app user abc. Live dirs normalized via host chown (NFS honors no_root_squash); both instances now report 0 download-client-dir errors. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -92,6 +92,27 @@
|
||||
timeout: 90
|
||||
loop: [7879, 8990]
|
||||
|
||||
# Pre-create the download-client COMPLETED category dirs so a fresh rebuild
|
||||
# doesn't surface "download client places downloads in X but it does not
|
||||
# appear to exist" health errors until the first grab lands in each category.
|
||||
# Owner 1000:3000 (abc:media) 0775 matches the rest of the /data tree — the
|
||||
# download-client app processes create category dirs this way on first use;
|
||||
# a manual `docker exec <client> mkdir` (runs as ROOT in linuxserver images)
|
||||
# produces root:0770 instead, which is the drift this task prevents.
|
||||
# become=root chown is honored by the TrueNAS NFS export (no_root_squash).
|
||||
- name: Ensure 4K download-client completed category dirs (abc:media 0775)
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
owner: "1000"
|
||||
group: "3000"
|
||||
mode: "0775"
|
||||
loop:
|
||||
- /mnt/media/data/usenet/complete/movies-4k # SABnzbd -> radarr-4k
|
||||
- /mnt/media/data/usenet/complete/tv-4k # SABnzbd -> sonarr-4k
|
||||
- /mnt/media/data/torrents/radarr-uhd # Transmission -> radarr-4k
|
||||
- /mnt/media/data/torrents/sonarr-uhd # Transmission -> sonarr-4k
|
||||
|
||||
- name: Install 4K download-client config script
|
||||
ansible.builtin.copy:
|
||||
dest: "{{ app_dir }}/ensure-arrs-4k-dl.py"
|
||||
|
||||
Reference in New Issue
Block a user