Commit Graph

111 Commits

Author SHA1 Message Date
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
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
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
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
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
e1d36045da Solved open run_once issues 2025-07-20 14:23:08 +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
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
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
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
f9426cfb74 Optimized role structure in preparation for new backup script 2025-07-16 12:31:01 +02:00
54490faca7 Ignore comment out paths 2025-07-15 22:31:11 +02:00
b6eb73dee4 Implemented that schemas are recognized 2025-07-15 22:22:22 +02:00
3fed9eb75a Ignore ansible_memtotal_mb 2025-07-15 21:40:32 +02:00
45c18b69ba Ignore {% 2025-07-15 21:39:41 +02:00
2e2501980c Added recognition of option_kv 2025-07-15 18:19:48 +02:00
a6afbaff38 Implemented vars files scanning on n levels 2025-07-15 18:13:33 +02:00
b61f695aac Added test for no_stop_required attribute 2025-07-15 17:10:05 +02:00
733356b4f7 Added pattern for register: variables 2025-07-15 17:04:36 +02:00
21b4fdee47 Added pattern to whitelist set- for- 2025-07-15 16:57:39 +02:00
c99def5724 Optimized variable definition tester 2025-07-15 14:31:03 +02:00
d5c14ad53c Added varaible defintion test draft 2025-07-15 13:54:10 +02:00
fff06d52b8 Added variable usage test 2025-07-15 11:57:31 +02:00
9dc55c5893 Optimized warnings 2025-07-14 11:19:29 +02:00
33d14741e2 Added j2 sniffer and solved syntax bugs 2025-07-13 21:20:23 +02:00
991ed7d614 Finished integration test 2025-07-13 17:27:56 +02:00
840836702d Ignored .py .sh 2025-07-13 17:19:12 +02:00
9142eeba3c Improved performance 2025-07-13 17:02:37 +02:00
882cf47c20 Added credentials testing 2025-07-13 16:58:33 +02:00
92245b5935 Added basic integration test for get_app_path values to verify if they exists 2025-07-13 16:43:33 +02:00
5340d580ce Optimized filter functions 2025-07-13 14:20:22 +02:00