refactor(homarr): extract layout packing to filter plugin

This commit is contained in:
Tobias Wüst 2026-05-19 11:19:29 +02:00
parent e0cb1ac68c
commit 61193e26f4
Signed by: Tobias-Wuest
GPG key ID: 2D8992B0F4CA97E8
6 changed files with 405 additions and 58 deletions

View file

@ -128,7 +128,23 @@
no_log: true
# =====================================================================
# 5. SEED DATABASE (only if local admin user does not exist yet)
# 5. COMPUTE APP LAYOUTS
# =====================================================================
# Packing is done by the homarr_compute_layouts filter plugin (Python)
# rather than inline Jinja, so the seed template stays readable and the
# packing algorithm can be unit-tested in isolation.
- name: Compute Homarr app layouts
ansible.builtin.set_fact:
homarr_layout: "{{ homarr_apps | homarr_compute_layouts }}"
- name: Show computed app layouts
ansible.builtin.debug:
var: homarr_layout
verbosity: 1
# =====================================================================
# 6. SEED DATABASE (only if local admin user does not exist yet)
# =====================================================================
- name: Check if local admin user exists