2246 Commits

Author SHA1 Message Date
c744ebe3f9
feat(web-app-wordpress): add idempotent single-site domain update via WP-CLI
- New task 04_update_domain.yml updates home/siteurl only when needed
- DB-wide search-replace (old → new), GUID-safe, precise, tables-with-prefix
- Normalizes http→https, strips trailing slashes, then flushes cache/rewrites
- Guarded by is_multisite()==0; multisite untouched
- Wired into main.yml with auto target URL via domains|get_url

Fixes post-domain-change mixed/CSP issues due to hard-coded old URLs.

https://chatgpt.com/share/689bac2d-3610-800f-b6f0-41dc79d13a14
2025-08-12 23:03:59 +02:00
ce029881d0
cmp-rdbms: make vars resilient when database_type is empty
Fix a templating crash during docker-compose.yml rendering when a role sets database_type to an empty string or does not expose it (e.g., svc-prx-openresty). Previously _database_id resolved to 'svc-db-' and get_app_conf attempted to read 'docker.services..name', raising AppConfigKeyError: Application ID 'svc-db-' not found.

Changes:
- Introduce _dbtype = (database_type | d('') | trim) and build _database_id only if _dbtype is non-empty.
- Guard central DB lookups: use get_app_conf(..., strict=False, default='') and only when _dbtype is set.
- Default _database_consumer_entity_name to get_entity_name of database_application_id or fallback to application_id.
- Only resolve database_port when _dbtype is set; otherwise empty.
- Minor formatting fixes for env and URL strings.

Impact:
- Prevents failures in roles without a DB or with database_type=''.
- Keeps previous behavior intact for apps with a valid database_type (mariadb/postgres).
- Eliminates 'config_path: docker.services..name' errors while keeping compose templates stable.

https://chatgpt.com/share/689b9d11-6308-800f-b20c-2d9f18d832f1
2025-08-12 21:59:37 +02:00
94da112736
perf(friendica): single-pass patch for DB creds + system.url; align env URL; tidy vars
- Patch local.config.php in one sed exec:
  * hostname, database, username, password
  * system.url via '#' delimiter to avoid URL slash escaping
  * Single notify: docker compose up
- env.j2:
  * FRIENDICA_URL now uses domains|get_url(application_id, WEB_PROTOCOL)
  * Simplify FRIENDICA_DEBUGGING with |lower
  * Normalize spacing for readability
- vars/main.yml:
  * Minor cleanups (comment header, spacing)
  * Consistent friendica_docker_ldap_config path construction

Why: fewer container execs ⇒ faster runs; idempotent key updates; consistent URL configuration across env and PHP config.
Risk: requires WEB_PROTOCOL and domains|get_url to be defined in inventory/vars as elsewhere in the project.

https://chatgpt.com/share/689b92af-b184-800f-9664-2450e00b29d6
2025-08-12 21:15:33 +02:00
b62df5599d
Optimized typos 2025-08-12 19:17:02 +02:00
c9a7830953
Renamed to CONSTANT DATABASE_VARS_FILE 2025-08-12 17:45:19 +02:00
53e5c563ae
Refactor MIG build process to run asynchronously with optional wait control
- Moved MIG data build commands into a dedicated 02_build_data.yml task file.
- Added async execution (async: 3600, poll: 0) for non-blocking build.
- Introduced mig_wait_for_build variable to optionally wait for completion.
- Added debug message to inform how to disable waiting via build_data.wait_for=false for performance.
- Updated config to use nested build_data.enabled and build_data.wait_for structure.
- Adjusted variable lookups accordingly.

https://chatgpt.com/share/689b54d2-e3b0-800f-91df-939ebc5e12ef
2025-08-12 16:51:24 +02:00
0b3b3a810a
Solved bug which prevented backup2loc to be activated 2025-08-12 15:42:26 +02:00
6d14f16dfd
Optimized sys-timer 2025-08-12 15:00:12 +02:00
632d922977
Solved discourse flush handlers bug 2025-08-12 14:59:00 +02:00
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
0c4cd283c4
Optimized CDN variables during bug research 2025-08-12 14:31:24 +02:00
5d36a806ff
svc-db-postgres: add retry mechanism to all PostgreSQL tasks and fix condition handling
- Added register, until, retries, and delay to all PostgreSQL-related tasks
  in 02_init.yml to handle transient 'tuple concurrently updated' and similar errors.
- Changed 'when: "{{ postgres_init }}"' to 'when: postgres_init | bool' in main.yml
  for correct boolean evaluation.
- Switched 'role' to 'roles' in postgresql_privs tasks for forward compatibility.
- Added postgres_retry_retries and postgres_retry_delay defaults in vars/main.yml
  to centralize retry configuration.

  https://chatgpt.com/share/689b2360-a8a4-800f-9acb-6d88d6aa5cb7
2025-08-12 13:20:30 +02:00
84de85d905
Solved matrix flush handler bug 2025-08-12 12:54:27 +02:00
457f3659fa
Solved mobilizon flush docker handler bug 2025-08-12 12:03:53 +02:00
4c7ee0441e
Solved baserow variable bugs 2025-08-12 11:23:56 +02:00
140572a0a4
Solved missing deployment of postgres bug 2025-08-12 10:58:09 +02:00
a30cd4e8b5
Solved listmonk handler bugs 2025-08-12 04:38:41 +02:00
2067804e9f
Solved ansible multiplexing auth bug 2025-08-12 04:23:45 +02:00
1a42e8bd14
Replaced depenencies by includes for performance reasons 2025-08-12 03:08:33 +02:00
8634b5e1b3
Finished move_unnecessary_dependencies implementation 2025-08-12 02:39:22 +02:00
1595a7c4a6
Optimized tests für run once 2025-08-12 02:38:37 +02:00
82aaf7ad74
fixed move_unnecessary_dependencies.py 2025-08-11 23:41:48 +02:00
7e4a1062af
Added draft for fixing dependencies 2025-08-11 23:16:32 +02:00
d5e5f57f92
Optimized openproject for new repository structure 2025-08-11 23:03:24 +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
2219696c3f
Removed redirects for performance 2025-08-11 22:21:17 +02:00
fbaee683fd
Removed dependencies and used include_roles to raise performance and make infinito to a racing car 2025-08-11 21:56:34 +02:00
b301e58ee6
Removed redirect to safe performance 2025-08-11 21:48:33 +02:00
de15c42de8
Added database patch to wordpress 2025-08-11 21:46:29 +02:00
918355743f
Updated ansible.cfg for better performance and tracking 2025-08-11 21:00:33 +02:00
f6e62525d1
Optimized wordpress variables 2025-08-11 20:00:48 +02:00
f72ac30884
Replaced redirects by origine to raise performance 2025-08-11 19:44:14 +02:00
1496f1de95
Replaced community.general.pacman: by pacman to raise performance 2025-08-11 19:33:28 +02:00
38de10ba65
Solved bigbluebutton admin creation bug 2025-08-11 19:24:08 +02:00
e8c19b4b84
Implemented correct path replace not just for context: but also for build: paths 2025-08-11 18:46:02 +02:00
b0737b1cdb
Merge branch 'master' of github.com:kevinveenbirkenbach/cymais 2025-08-11 14:31:19 +02:00
e4cc928eea
Encapsulated SAN in block with when 2025-08-11 14:31:10 +02:00
c9b2136578
Merge pull request #5 from ocrampete16/logs-dir
Create logs dir to prevent failing test
2025-08-11 14:15:39 +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
c7badc608a
Solved typo 2025-08-11 13:25:32 +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
1ba50397db
Optimized performance by moving multiple similar when includes to own tasks file 2025-08-11 13:15:31 +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
6e04ac58d2
Moved blocks to include_tasks to raise performance. Deploy was really slow 2025-08-11 12:28:31 +02:00
b6e571a496
Solved config path entry bug 2025-08-11 12:19:24 +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
ea0149b5d4
Replaced nextcloud-application by nextcloud container name 2025-08-11 10:41:06 +02:00
fe76fe1e62
Added correct flush parameters for docker compose 2025-08-11 10:33:48 +02:00
3431796283
Wrapped docker compose file routines tasks in block for docker compose 2025-08-11 10:20:06 +02:00