Commit Graph

211 Commits

Author SHA1 Message Date
26b29debc0 Add integration test to ensure no Jinja variables are used in handler names
This test scans roles/*/handlers/main.yml and fails if a handler's 'name' contains a Jinja variable ({{ ... }}).
Reason:
- Handler names must be static to ensure reliable 'notify' resolution.
- Dynamic names can break handler matching, cause undefined-variable errors, and produce unstable logs.
Recommendation:
- Keep handler names static and, if dynamic behavior is needed, use a static 'listen:' key.

https://chatgpt.com/share/689b37dc-e1e4-800f-bd56-00b43c7701f6
2025-08-12 14:48:43 +02:00
1595a7c4a6 Optimized tests für run once 2025-08-12 02:38:37 +02:00
f671678720 Add integration test to detect unnecessary meta dependencies
This test scans all roles/*/meta/main.yml for meta dependencies that are
likely unnecessary and could be replaced with guarded include_role/import_role
calls to improve performance.

A dependency is flagged as unnecessary when:
- The consumer role does not use provider variables in defaults/vars/handlers
  (no early variable requirement), and
- Any usage of provider variables or handler notifications in tasks occurs
  only after an explicit include/import of the provider in the same file,
  or there is no usage at all.

Purpose:
Helps reduce redundant parsing/execution of roles and improves Ansible
performance by converting heavy global dependencies into conditional,
guarded includes where possible.

https://chatgpt.com/share/689a59ee-52f4-800f-8349-4f477dc97c7c
2025-08-11 23:00:49 +02:00
f72ac30884 Replaced redirects by origine to raise performance 2025-08-11 19:44:14 +02:00
5709935c92 Improved performance by avoiding the load of roles which are anyhow just protected by one condition 2025-08-11 13:52:24 +02:00
0e59d35129 Update RunOnceSchemaTest to skip files with deactivated run_once variables via comment https://chatgpt.com/share/6899d297-4bec-800f-a748-6816398d8c7e 2025-08-11 13:23:20 +02:00
6318611931 Add integration test to detect excessive duplicate 'when' conditions in tasks files
This test scans all .yml/.yaml files under any tasks/ directory and flags cases where the same
'when' condition appears on more than 3 tasks in the same file. Excessive duplication of identical
conditions can harm Ansible performance because the condition is re-evaluated for every task.

The test suggests replacing repeated conditions with an include_tasks call or a block guarded
by the condition to evaluate it only once.

https://chatgpt.com/share/6899c605-6f40-800f-a954-ccb62f8bbcf1
2025-08-11 12:29:57 +02:00
21b6362bc1 test(integration): fail if reset.yml exists but is never included
Updated test_mode_reset.py to also validate roles that contain a reset
task file (*_reset.yml or reset.yml) even when no mode_reset keyword is
found. The test now:

- Detects roles with reset files but no include, and fails accordingly.
- Ignores commented include_tasks and when lines.
- Ensures exactly one non-commented include of the reset file exists.
- Requires that the include is guarded in the same task block by a
  when containing mode_reset | bool (with optional extra conditions).

This prevents silent omissions of reset task integration.

https://chatgpt.com/share/6899b745-7150-800f-98f3-ca714486f5ba
2025-08-11 11:27:15 +02:00
1fcf072257 Added performance violation test for blocks 2025-08-11 10:50:42 +02:00
b5d8ac5462 Reactivated keycloak docker and webserver tasks and implemented correct logic for element and synapse redirect handling 2025-08-11 02:21:02 +02:00
6e8ae793e3 Added auto setting for redirect urls for keycloak clients. Element and Synapse still need to be mapped 2025-08-11 00:17:18 +02:00
149c563831 Optimized logic for database backups and integrated test to verify that database feature is used correct 2025-08-10 15:06:37 +02:00
d9669fc6dd Added test to verify that no handlers are skipped due to when condition 2025-08-09 15:24:47 +02:00
c7b25ed093 Normalized run_once_, made openresty handlers without when aviable and forced flush in run_once when blocks to avoid handlers with when conditions 2025-08-08 15:32:26 +02:00
9f865dd215 Removed catetory domain präfix from redirect domains 2025-08-08 09:47:31 +02:00
5a0684fa2d Adapted CSP to new server dict structure 2025-08-07 13:00:52 +02:00
9228d51e86 Restructured server config 2025-08-07 11:31:06 +02:00
44e0fea0b2 Renamed cymais to infinito and did some other optimations and logout implementations 2025-07-29 16:35:42 +02:00
27973c2773 Optimized injection layer on lua base, as replace for nginx replace. Also optimized cloudflare cache deletion(no everytime for cleanup). Still CDN is required for logout mechanism via JS and Nextcloud deploy is buggy after changing from nginx to openresty. Propably some variable overwritte topic. Should be solved tomorrow. 2025-07-24 19:13:13 +02:00
f62355e490 Replaced nginx native with openresty for logout injection. Right now still buggy on nextcloud and espocrm 2025-07-24 03:19:16 +02:00
c2f83abb60 Added better debugging 2025-07-22 19:14:40 +02:00
d94254effb Made canonical domains obligatorix 2025-07-22 18:47:38 +02:00
4b9e7dd3b7 Implemented universal logout 2025-07-22 13:14:06 +02:00
b1bf7aaba5 Fixed BBB stuff 2025-07-21 15:10:05 +02:00
a1643870db Optimized auto playbook creation 2025-07-21 15:09:38 +02:00
7e58b825ea Changed pgadmin to web-app-pgadmin 2025-07-21 10:36:51 +02:00
d9c4493e0d Optimized mode_reset test 2025-07-21 09:08:03 +02:00
257d0c4673 Set entity name as default domain instead of application_id 2025-07-20 15:44:28 +02:00
e1d36045da Solved open run_once issues 2025-07-20 14:23:08 +02:00
c572d535e2 Optimized test for tree creation 2025-07-20 11:41:16 +02:00
5501e40b7b Optimized run_once test 2025-07-20 11:21:14 +02:00
d86ca6cc0e Adapted discourse version to new code after the big refactoring 2025-07-20 09:29:56 +02:00
8ccfb1dfbe Added icon to mig 2025-07-19 16:26:10 +02:00
6a1a83432f Different optimations and mig integration. test will fail due to strickter validation checks. need to be cleaned up tomorrow 2025-07-18 20:08:20 +02:00
85195e01f9 Activated loading of env depending on if it exist 2025-07-18 19:40:34 +02:00
45624037b1 Added shadow option to tree for mig 2025-07-18 19:35:44 +02:00
a738199868 Added run_once_validator 2025-07-18 14:43:53 +02:00
409e659143 Overall optimations for application id naming 2025-07-17 17:41:52 +02:00
562603a8cd Restructured libraries 2025-07-17 16:38:20 +02:00
ad449c3b6a Adapted roles to new architecture 2025-07-17 15:39:31 +02:00
725fea1169 Solved database credentials bug 2025-07-17 06:32:53 +02:00
1bdfb71f2f Finished backup update 2025-07-17 00:34:54 +02:00
2f45038bef Solved variable bugs 2025-07-16 23:01:25 +02:00
f263992393 Added recursion test for group_vars 2025-07-16 22:31:48 +02:00
70f7953027 Added backup value key mapper 2025-07-16 20:03:00 +02:00
169493179e Restructuring for new backup solution 2025-07-16 19:09:31 +02:00
dea2669de2 Solved unclosed file <_io.TextIOWrapper warnings 2025-07-16 14:33:10 +02:00
e4ce3848fc Optimized for github workflow 2025-07-16 14:22:47 +02:00
f9426cfb74 Optimized role structure in preparation for new backup script 2025-07-16 12:31:01 +02:00
241c5c6da8 Optimized test_main.py 2025-07-16 08:25:16 +02:00