From 462d157d3942ac862ce9f561cc61a68fd20b1352 Mon Sep 17 00:00:00 2001 From: Roxedus Date: Sun, 16 Mar 2025 14:19:59 +0100 Subject: [PATCH 1/3] Clarify media blurb --- .../templates/README_SNIPPETS/MEDIA.j2 | 2 +- .../documentation/templates/documentation.md.j2 | 14 +++++++------- .../roles/documentation/templates/readme.md.j2 | 16 ++++++++-------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/ansible/roles/documentation/templates/README_SNIPPETS/MEDIA.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/MEDIA.j2 index 7379a50f..83036e81 100644 --- a/ansible/roles/documentation/templates/README_SNIPPETS/MEDIA.j2 +++ b/ansible/roles/documentation/templates/README_SNIPPETS/MEDIA.j2 @@ -1,6 +1,6 @@ ### Media folders -We have set /music and /downloads as optional paths, this is because it is the easiest way to get started. While easy to use, it has some drawbacks. Mainly losing the ability to hardlink (TL;DR a way for a file to exist in multiple places on the same file system while only consuming one file worth of space), or atomic move (TL;DR instant file moves, rather than copy+delete) files while processing content. +We have set '{{ opt_param_volumes[0].vol_path | default("/movies, /tv or /music") }}' and '/downloads' as optional paths, this is because it is the easiest way to get started. While easy to use, it has some drawbacks. Mainly losing the ability to hardlink (TL;DR a way for a file to exist in multiple places on the same file system while only consuming one file worth of space), or atomic move (TL;DR instant file moves, rather than copy+delete) files while processing content. Use the optional paths if you don't understand, or don't want hardlinks/atomic moves. diff --git a/ansible/roles/documentation/templates/documentation.md.j2 b/ansible/roles/documentation/templates/documentation.md.j2 index 9a23f7e5..b0d68661 100644 --- a/ansible/roles/documentation/templates/documentation.md.j2 +++ b/ansible/roles/documentation/templates/documentation.md.j2 @@ -40,13 +40,6 @@ description: "{{ noter(project_blurb) | trim }}" {% if app_setup_block_enabled %} {% include "README_SNIPPETS/APPLICATION_SETUP.j2" | trim %} -{% if readonly_supported is defined and readonly_supported %} -{% include "README_SNIPPETS/READONLY.j2" | trim %} - -{% endif %} -{% if nonroot_supported is defined and nonroot_supported %} -{% include "README_SNIPPETS/NONROOT.j2" | trim %} - {% endif %} {% if ["CI_SSL='true'", "CI_SSL= 'true'" ,"CI_SSL = 'true'"]|select("in", repo_vars) %} {% include "README_SNIPPETS/STRICT_PROXY.j2" | trim %} @@ -72,6 +65,13 @@ description: "{{ noter(project_blurb) | trim }}" {% include "README_SNIPPETS/KASM.j2" | trim %} {% endif %} +{% if readonly_supported is defined and readonly_supported %} +{% include "README_SNIPPETS/READONLY.j2" | trim %} + +{% endif %} +{% if nonroot_supported is defined and nonroot_supported %} +{% include "README_SNIPPETS/NONROOT.j2" | trim %} + {% endif %} {% include "README_SNIPPETS/USAGE.j2" | trim %} diff --git a/ansible/roles/documentation/templates/readme.md.j2 b/ansible/roles/documentation/templates/readme.md.j2 index 272e9e60..fe54b74f 100644 --- a/ansible/roles/documentation/templates/readme.md.j2 +++ b/ansible/roles/documentation/templates/readme.md.j2 @@ -32,14 +32,6 @@ {% if app_setup_block_enabled %} {% include "README_SNIPPETS/APPLICATION_SETUP.j2" | trim %} -{% if readonly_supported is defined and readonly_supported %} -{% include "README_SNIPPETS/READONLY.j2" | trim %} - -{% endif %} -{% if nonroot_supported is defined and nonroot_supported %} -{% include "README_SNIPPETS/NONROOT.j2" | trim %} - -{% endif %} {% if ["CI_SSL='true'", "CI_SSL= 'true'" ,"CI_SSL = 'true'"]|select("in", repo_vars) %} {% include "README_SNIPPETS/STRICT_PROXY.j2" | trim %} @@ -63,6 +55,14 @@ {% if kasm_blurb is defined %} {% include "README_SNIPPETS/KASM.j2" | trim %} +{% endif %} +{% if readonly_supported is defined and readonly_supported %} +{% include "README_SNIPPETS/READONLY.j2" | trim %} + +{% endif %} +{% if nonroot_supported is defined and nonroot_supported %} +{% include "README_SNIPPETS/NONROOT.j2" | trim %} + {% endif %} {% endif %} {% include "README_SNIPPETS/USAGE.j2" | trim %} From 64042d9c046145399820cecaa4b28637aa08f9ec Mon Sep 17 00:00:00 2001 From: Roxedus Date: Sun, 16 Mar 2025 15:06:06 +0100 Subject: [PATCH 2/3] Acount for downloaders --- .../roles/documentation/templates/README_SNIPPETS/MEDIA.j2 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ansible/roles/documentation/templates/README_SNIPPETS/MEDIA.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/MEDIA.j2 index 83036e81..9b852a0b 100644 --- a/ansible/roles/documentation/templates/README_SNIPPETS/MEDIA.j2 +++ b/ansible/roles/documentation/templates/README_SNIPPETS/MEDIA.j2 @@ -1,7 +1,8 @@ ### Media folders +{% set has_media_path=((opt_param_volumes[0].vol_path | default("yes")) != "/downloads") %} -We have set '{{ opt_param_volumes[0].vol_path | default("/movies, /tv or /music") }}' and '/downloads' as optional paths, this is because it is the easiest way to get started. While easy to use, it has some drawbacks. Mainly losing the ability to hardlink (TL;DR a way for a file to exist in multiple places on the same file system while only consuming one file worth of space), or atomic move (TL;DR instant file moves, rather than copy+delete) files while processing content. +We have set {% if has_media_path %}'{{ opt_param_volumes[0].vol_path | default("/movies, /tv or /music") }}' and {% endif %}'/downloads' as optional path{% if has_media_path %}s{% endif %}, this is because it is the easiest way to get started. While easy to use, it has some drawbacks. Mainly losing the ability to hardlink (TL;DR a way for a file to exist in multiple places on the same file system while only consuming one file worth of space), or atomic move (TL;DR instant file moves, rather than copy+delete) files while processing content. -Use the optional paths if you don't understand, or don't want hardlinks/atomic moves. +Use the optional path{% if has_media_path %}s{% endif %} if you don't understand, or don't want hardlinks/atomic moves. {{ "The folks over at servarr.com wrote a good [write-up](https://wiki.servarr.com/docker-guide#consistent-and-well-planned-paths) on how to get started with this." | admonition(flavour=markdown, severity="tip", title="Well planned paths", collapse=False) }} From 205746e39d440200b34a97ccaf8efff33b7b2389 Mon Sep 17 00:00:00 2001 From: Roxedus Date: Sun, 16 Mar 2025 16:07:17 +0100 Subject: [PATCH 3/3] Markdown --- ansible/roles/documentation/templates/README_SNIPPETS/MEDIA.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/documentation/templates/README_SNIPPETS/MEDIA.j2 b/ansible/roles/documentation/templates/README_SNIPPETS/MEDIA.j2 index 9b852a0b..dce69645 100644 --- a/ansible/roles/documentation/templates/README_SNIPPETS/MEDIA.j2 +++ b/ansible/roles/documentation/templates/README_SNIPPETS/MEDIA.j2 @@ -1,7 +1,7 @@ ### Media folders {% set has_media_path=((opt_param_volumes[0].vol_path | default("yes")) != "/downloads") %} -We have set {% if has_media_path %}'{{ opt_param_volumes[0].vol_path | default("/movies, /tv or /music") }}' and {% endif %}'/downloads' as optional path{% if has_media_path %}s{% endif %}, this is because it is the easiest way to get started. While easy to use, it has some drawbacks. Mainly losing the ability to hardlink (TL;DR a way for a file to exist in multiple places on the same file system while only consuming one file worth of space), or atomic move (TL;DR instant file moves, rather than copy+delete) files while processing content. +We have set {% if has_media_path %}`{{ opt_param_volumes[0].vol_path | default("/movies, /tv or /music") }}` and {% endif %}`/downloads` as optional path{% if has_media_path %}s{% endif %}, this is because it is the easiest way to get started. While easy to use, it has some drawbacks. Mainly losing the ability to hardlink (TL;DR a way for a file to exist in multiple places on the same file system while only consuming one file worth of space), or atomic move (TL;DR instant file moves, rather than copy+delete) files while processing content. Use the optional path{% if has_media_path %}s{% endif %} if you don't understand, or don't want hardlinks/atomic moves.