Commit Graph
64 Commits
Author SHA1 Message Date
kevinveenbirkenbach 135f366369 refactor(sys-svc-rdbms): switch central DB logic to database lookup plugin
- group central database creation and backup seeding into a single block
- resolve database metadata (type, instance, host, etc.) via lookup('database')
- remove legacy per-task central DB handling
- prepare sys-svc-rdbms for unified database plugin usage

https://chatgpt.com/share/6983cd01-a430-800f-9fe7-36551b14d30d
2026-02-04 23:49:23 +01:00
kevinveenbirkenbach e194981535 refactor(backup): make database seeding strict and explicit
- enforce explicit database parameters for baudolo seeding
- replace implicit checks with assert-based fail-fast logic
- update rdbms, matrix and bigbluebutton roles to pass all db fields
- keep backup behavior unchanged while hardening configuration

https://chatgpt.com/share/6983c9e4-860c-800f-b0f7-28462c08e249
2026-02-04 23:36:08 +01:00
kevinveenbirkenbach 4b7200b451 lookup(database): add stable db role id and switch consumers to use it
- Extend database lookup with `id` (e.g. svc-db-postgres, svc-db-mariadb)
- Return empty id when no database type is configured
- Replace dynamic 'svc-db-{{ type }}' constructions with lookup-provided id
- Update docker network templates to rely on lookup database id
- Adjust sys-svc-rdbms to load DB role via lookup id
- Extend unit tests to assert correct id behavior for all cases

This makes DB role resolution explicit, safer, and less error-prone.

https://chatgpt.com/share/6983c6de-c5f8-800f-a5e3-786f90e0ebc1
2026-02-04 23:23:03 +01:00
kevinveenbirkenbach f6f96a11ac Refactor: use database lookup helper everywhere
https://chatgpt.com/share/6983bcf6-85bc-800f-a0fc-5684b9078469
2026-02-04 22:52:08 +01:00
kevinveenbirkenbach 3e8abe3cb4 fix(rdbms): preserve database_consumer_id across role boundaries
- Introduce database_consumer_id_passed to avoid fact/vars collisions
- Explicitly pass consumer context into svc-db-postgres via include_role
- Strengthen context assertion in postgres init tasks
- Move once-flag include to the beginning of postgres core tasks
- Make POSTGRES_EXEC_SHELL non-interactive by injecting PGPASSWORD
- Improve test coverage to detect facts overridden by include-time vars

https://chatgpt.com/share/69833e56-93a0-800f-8e3d-d970cf87daef
2026-02-04 13:40:44 +01:00
kevinveenbirkenbach 77a0bc5508 svc-db-postgres: unify docker exec shell + tidy yaml formatting
- Align database config key spacing and add missing newline in config/main.yml
- Run socket readiness check as OS user postgres
- Introduce POSTGRES_EXEC_SHELL helper and use it for TCP/auth debug psql calls
- Update sys-svc-rdbms comment (behavior note seems outdated)

https://chatgpt.com/share/6982a0b9-be28-800f-b5dc-d489b1e4eed8
2026-02-04 02:28:01 +01:00
kevinveenbirkenbach 4f0e45159d Optimized database_type loading 2026-01-10 16:51:18 +01:00
kevinveenbirkenbach 73ec220847 Added utils/load_handlers.yml required due to update 2.18 -> 2.20 2025-12-04 11:04:00 +01:00
kevinveenbirkenbach 1d0f26617a Optimized docker_git_repository_ variables 2025-12-03 14:23:53 +01:00
kevinveenbirkenbach 716ebef33b Refactor task includes and update variable handling for Ansible 2.20 migration
This commit updates multiple roles to ensure compatibility with Ansible 2.20.
Several include paths and task-loading mechanisms required adjustments,
as Ansible 2.20 applies stricter evaluation rules for complex Jinja expressions
and no longer resolves certain relative include paths the way Ansible 2.18 did.

Key changes:
- Replaced legacy once_finalize.yml and once_flag.yml with the new structure
  under tasks/utils/once/finalize.yml and tasks/utils/once/flag.yml.
- Updated all include_tasks statements to use 'path_join' with playbook_dir,
  ensuring deterministic and absolute file resolution across roles.
- Fixed all network helper includes by converting direct relative paths such as
  'roles/docker-compose/tasks/utils/network.yml' to proper Jinja-evaluated paths.
- Normalized MATOMO_* variable names for consistency with the updated variable
  scope behavior in Ansible 2.20.
- Removed deprecated patterns that were implicitly supported in Ansible 2.18
  but break under the more strict variable and path resolution model in 2.20.

These changes are part of the full migration step required to ensure the
infinito-nexus roles remain stable, deterministic, and forward-compatible with
Ansible 2.20.

Details of the discussion and reasoning can be found in this conversation:
https://chatgpt.com/share/69300a8d-24d4-800f-bec0-e895a695618a
2025-12-03 11:02:34 +01:00
kevinveenbirkenbach 0756e9d06e Optimized database variables 2025-12-02 11:59:55 +01:00
kevinveenbirkenbach fa6bb67a66 Removed whitespaces in templates: 2025-09-22 16:28:57 +02:00
kevinveenbirkenbach 577767bed6 sys-svc-rdbms: Refactor database service templates and add version support for Magento
- Unified Jinja2 variable spacing in tasks and templates
- Introduced database_image and database_version variables in vars/database.yml
- Updated mariadb.yml.j2 and postgres.yml.j2 to use {{ database_image }}:{{ database_version }}
- Ensured env file paths and includes are consistent
- Prepared support for versioned database images (needed for Magento deployment)

Ref: https://chatgpt.com/share/68b96a9d-c100-800f-856f-cd23d1eda2ed
2025-09-04 12:32:34 +02:00
kevinveenbirkenbach 6ea8301364 Refactor: migrate cmp/* and srv/* roles into sys-stk/* and sys-svc/* namespaces
- Removed obsolete 'cmp' category, introduced 'stk' category (fa-bars-staggered icon).
- Renamed roles:
  * cmp-db-docker → sys-stk-back-stateful
  * cmp-docker-oauth2 → sys-stk-back-stateless
  * srv-domain-provision → sys-stk-front
  * cmp-db-docker-proxy → sys-stk-full-stateful
  * cmp-docker-proxy → sys-stk-full-stateless
  * cmp-rdbms → sys-svc-rdbms
- Updated all include_role references, vars, templates and README.md files.
- Adjusted run_once comments and variable paths accordingly.
- Updated all web-app roles to use new sys-stk/* and sys-svc/* roles.

Conversation: https://chatgpt.com/share/68b0ba66-09f8-800f-86fc-76c47009d431
2025-08-28 22:23:09 +02:00