refactor(homarr): extract layout packing to filter plugin
This commit is contained in:
parent
e0cb1ac68c
commit
61193e26f4
6 changed files with 405 additions and 58 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue