Commit Graph
81 Commits
Author SHA1 Message Date
kevinveenbirkenbach e1784f88bd chore(python): unify shebangs to env python3 2026-02-23 08:47:40 +01:00
kevinveenbirkenbach 92946ee008 refactor(core): introduce SOFTWARE_DOMAIN and unify homepage, tls, service, and oidc defaults
* add SOFTWARE_DOMAIN derived from SOFTWARE_NAME lowercased
* introduce DOMAIN_HOMEPAGE defaulting to dashboard domain if present, otherwise SOFTWARE_DOMAIN
* add automatic primary → homepage redirect mapping in constructor
* migrate TLS and CA paths from SOFTWARE_NAME|lower to SOFTWARE_DOMAIN
* update systemd unit suffix and timer/service discovery globs to SOFTWARE_DOMAIN
* switch OIDC default realm and client id to SOFTWARE_DOMAIN
* adjust SuiteCRM well-known software name to SOFTWARE_DOMAIN
* update unit tests to use SOFTWARE_DOMAIN for strict Jinja expansion

https://chatgpt.com/share/698db094-22bc-800f-8454-10d97f817659
2026-02-12 11:50:55 +01:00
kevinveenbirkenbach 7a3c44b013 refactor(invokable): derive deployment types from invokable roles via DEFAULT_RULES
- Remove alias-based group name handling from get_deployment_types_from_groups
- Make DEFAULT_RULES the single source of truth for server/workstation/universal
- Determine "universal" strictly as invokable roles not matched by server/workstation
- Update unit tests to reflect invokable-based semantics

This aligns Ansible filters and CLI behavior and avoids inventory-specific heuristics.

https://chatgpt.com/share/698b8125-d2a0-800f-9fbd-f3f9c8bc5023
2026-02-10 20:04:00 +01:00
kevinveenbirkenbach 5acce545e1 refactor(cli): remove sound, alarm and server-type flags
Drop the sound/alarm subsystem and deprecated CLI flags.

* Remove --sound, --no-signal and --alarm-timeout
* Remove server-type flag (-T / TEST_DEPLOY_TYPE)
* Delete sound-related modules
* Simplify RunConfig and runner error handling
* Update help output, scripts and tests
* Remove optional audio extras from pyproject.toml

https://chatgpt.com/share/698b74f1-0c0c-800f-98c4-183697d6a2a0
2026-02-10 19:10:37 +01:00
kevinveenbirkenbach df9a23ceed feat(ci): unify invokable app discovery and add lifecycle filtering
- Move server/workstation/universal resolution into Python CLI
- Add optional --lifecycles filter to cli.meta.applications.type
- Gate invokable roles by galaxy_info.lifecycle in module_utils.invokable
- Replace legacy resolve-invokable-roles.sh with CLI-based implementation
- Apply global hard excludes consistently across all deploy types
- Fix SC2086 issues and make lifecycle argument handling shell-safe
- Extend unit tests to cover lifecycle forwarding and normalization

https://chatgpt.com/share/698b0039-c4c4-800f-b962-7033324c07a8
2026-02-10 11:50:09 +01:00
kevinveenbirkenbach 84782f3b22 refactor(invokable): centralize app discovery, add type grouping, and derive deploy stages from inventory groups
https://chatgpt.com/share/698b0039-c4c4-800f-b962-7033324c07a8
2026-02-10 10:53:53 +01:00
kevinveenbirkenbach 88c3bbb721 test: fix templating env lookup fallback and unify unittest.mock import usage
https://chatgpt.com/share/698992ef-215c-800f-a93e-5d8e75b81f23
2026-02-09 08:55:17 +01:00
kevinveenbirkenbach ac05af4468 Merge remote-tracking branch 'origin/alert-autofix-196' into merge-autofix 2026-02-09 08:42:35 +01:00
kevinveenbirkenbach 243e8ff43a Merge remote-tracking branch 'origin/alert-autofix-225' into merge-autofix 2026-02-09 08:41:51 +01:00
kevinveenbirkenbach b47380958d Merge branch 'alert-autofix-219' 2026-02-09 08:35:22 +01:00
kevinveenbirkenbachandCopilot Autofix powered by AI 61ebfd17ae Potential fix for code scanning alert no. 219: Unused local variable
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-09 08:01:36 +01:00
kevinveenbirkenbachandCopilot Autofix powered by AI 89019ba30a Potential fix for code scanning alert no. 218: Unused local variable
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-09 08:01:26 +01:00
kevinveenbirkenbachandCopilot Autofix powered by AI 2dc177f4f5 Potential fix for code scanning alert no. 225: Unused local variable
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-09 08:00:33 +01:00
kevinveenbirkenbachandCopilot Autofix powered by AI 73f3962365 Potential fix for code scanning alert no. 196: Jinja2 templating with autoescape=False
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-09 07:56:53 +01:00
kevinveenbirkenbach 4e5e8d2a7d Fix compose down behavior and harden templar rendering
- Restore full teardown semantics in Compose.down by delegating to down_stack
  (including volume removal and CI cleanup)
- Normalize templar render output to string to avoid None-related failures
- Clean up unused variable in templating fallback path
- Reorder test imports without changing behavior

https://chatgpt.com/share/69890935-4f1c-800f-8f2c-1b18a1df0ea5
2026-02-08 23:07:44 +01:00
kevinveenbirkenbach 04864c44d6 Solved errors 2026-02-08 21:43:13 +01:00
kevinveenbirkenbach 28fa34b0bb Solved errors 2026-02-08 21:36:26 +01:00
kevinveenbirkenbach 0ff80e36e7 Merge branch 'master' into alert-autofix-200 2026-02-08 20:35:13 +01:00
kevinveenbirkenbachandCopilot Autofix powered by AI 0e57c1d480 Potential fix for code scanning alert no. 220: Unused local variable
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-08 20:16:25 +01:00
kevinveenbirkenbachandCopilot Autofix powered by AI 4a67fe9e4b Potential fix for code scanning alert no. 219: Unused local variable
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-08 20:16:13 +01:00
kevinveenbirkenbachandCopilot Autofix powered by AI fd0ff5c872 Potential fix for code scanning alert no. 218: Unused local variable
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-08 20:16:04 +01:00
kevinveenbirkenbachandCopilot Autofix powered by AI e50bb3caa6 Potential fix for code scanning alert no. 203: Empty except
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-08 18:47:22 +01:00
kevinveenbirkenbachandCopilot Autofix powered by AI 02d948e1e5 Potential fix for code scanning alert no. 200: Empty except
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-08 18:41:49 +01:00
kevinveenbirkenbach a55c99ef62 refactor(compose): replace docker lookup with container and unify compose paths
- Rename lookup plugin from `docker` to `container`
- Switch all lookups from `lookup('docker', ...)` to `lookup('container', ...)`
- Normalize compose file keys:
  - docker_compose → compose
  - docker_compose_override → compose_override
  - docker_compose_ca_override → compose_ca_override
- Centralize compose path resolution via docker_paths_utils
- Update compose_file_args to always derive paths from DIR_COMPOSITIONS
- Align all roles, templates, and vars with container/compose naming
- Update and rename unit tests accordingly

This prepares the codebase for engine-agnostic container backends
(e.g. Docker ↔ Podman) and removes legacy docker-specific assumptions.

https://chatgpt.com/share/6987a7cc-d374-800f-99ad-bb4c8f92c59e
2026-02-07 21:59:39 +01:00
kevinveenbirkenbach b78ab29218 Renamed config entry from docker to compose
https://chatgpt.com/share/69870f54-d708-800f-9870-e9ae5a4bff44
2026-02-07 11:09:36 +01:00
kevinveenbirkenbach 53e817fa22 refactor(compose): migrate from docker-compose.yml to compose.yml everywhere
- Rename all docker-compose.yml templates to compose.yml
- Update override and CA override filenames accordingly
- Adjust compose wrapper, lookup plugins, filters and path helpers
- Update roles, tasks, handlers and scripts to use compose CLI
- Rewrite documentation and admin guides to reference compose
- Update unit and integration tests to expect compose.yml
- Keep internal variable keys for backward compatibility where needed

https://chatgpt.com/share/69870272-b168-800f-84c3-6417398e441f
2026-02-07 10:14:21 +01:00
kevinveenbirkenbach e1e1f3eb11 chore(vars): rename PATH_* to DIR_/BIN_/FILE_ conventions
https://chatgpt.com/share/6985cf49-3c74-800f-af97-f68b1969ab01
2026-02-06 12:23:46 +01:00
kevinveenbirkenbach 24616b2d35 refactor: extract get_docker_paths to module_utils and fix affected tests
- Move get_docker_paths() implementation from filter_plugins to module_utils
  to make it reusable by filters and lookup plugins (single source of truth)
- Adapt filter_plugins/get_docker_paths.py to re-export the shared util
- Add new lookup plugin "database" resolving DB settings from applications config
- Fix unit test patching: patch module_utils.docker_paths_utils.get_entity_name
  instead of filter module, because imports are now bound at util level
- Add comprehensive unit tests for database lookup covering all helper-variable cases

https://chatgpt.com/share/6983b526-00dc-800f-b3a0-b71e4104d0fc
2026-02-04 22:07:42 +01:00
kevinveenbirkenbach 8a81630391 Added newline at file and POSIX compatible 2026-02-04 19:49:56 +01:00
kevinveenbirkenbach eccbce8034 templating: support list literals and path_join in fallback renderer
https://chatgpt.com/share/697e2b3c-7458-800f-bb6b-143f78a57551
2026-01-31 17:17:53 +01:00
kevinveenbirkenbach aef99bf64e test(nginx_paths): mock tls_resolve lookup for protocol resolution
https://chatgpt.com/share/697ddc45-893c-800f-9c6d-ee899e4851cc
2026-01-31 11:40:21 +01:00
kevinveenbirkenbach ea8fbbdd71 fix(tls): resolve domains via app canonicals/aliases
- add module_utils/domain_mapper to map domains (canonical/aliases) -> application_id
  supporting str/list/dict and nested structures
- extend tls_common.resolve_term to optionally resolve alias domains via applications
  while keeping legacy lookup via global domains mapping intact
- pass applications into tls_resolve and cert_plan
- add unit tests for domain_mapper

https://chatgpt.com/share/697d500f-b884-800f-ba5b-088a2340f9d6
2026-01-31 01:42:43 +01:00
kevinveenbirkenbach 2678090934 feat(ca-trust): unify trust injection + strict templating
Move `with-ca-trust.sh` to `sys-ca-selfsigned` as the single source of truth, add `CA_TRUST_NAME`/`trust_name`, and pass it through `compose_ca_inject.py` + `compose_ca_inject_cmd`. Introduce `module_utils/templating.py` for strict multi-pass rendering with fallback env lookup, update TLS self-signed regen logic, purge script, and extend unit tests accordingly.

https://chatgpt.com/share/697c876d-7140-800f-9981-762dfeeafdfe
2026-01-30 11:26:46 +01:00
kevinveenbirkenbach 8bff1b984d refactor(jinja): add strict recursive renderer and use in tls/compose lookups
Introduce module_utils/jinja_strict.py to render nested Jinja-in-vars with hard-fail semantics. Refactor cert_plan, compose_f_args, and compose_ca_inject_cmd to use render_strict so no "{{ ... }}" leaks into generated paths/commands, and add unit tests.

https://chatgpt.com/share/697b8e1b-54fc-800f-b895-7161f00ebd51
2026-01-29 17:42:28 +01:00
kevinveenbirkenbach c3c54ce043 refactor(tls): split resolution and certificate planning, add global self-signed SAN support
- Extract shared TLS logic into module_utils/tls_common
- Introduce cert_plan lookup for certificate paths and SAN computation
- Simplify tls_resolve to strict protocol/port/domain resolution only
- Add global self-signed certificate scope covering all domains
- Mount self-signed cert base into OpenResty container
- Update Nginx templates to use cert_plan for ssl_certificate paths
- Add comprehensive unit tests for tls_common, tls_resolve, and cert_plan

https://chatgpt.com/share/6972c568-9e8c-800f-b89a-a0061966f9a8
2026-01-23 01:48:31 +01:00
kevinveenbirkenbach fae7b82243 feat(security): introduce strong_password filter backed by ValueGenerator
- add strong_password Jinja2 filter as thin wrapper around ValueGenerator
- enforce password policy (upper, lower, digit, special, min length)
- replace insecure ascii-only password lookup with strong_password filter
- update CLI setup users and unit tests accordingly
- harden inventory sample password example

https://chatgpt.com/share/69722c7e-ebe0-800f-a9ab-a3e21b43269c
2026-01-22 14:56:05 +01:00
kevinveenbirkenbach e1749f7cb7 **fix(ci): resolve roles directory relative to repo root instead of cwd**
https://chatgpt.com/share/696e3d20-276c-800f-87a7-a7052989ffe4
2026-01-19 18:55:22 +01:00
kevinveenbirkenbach 98e44c2b99 Speed up piepline debugging 2026-01-19 18:39:50 +01:00
kevinveenbirkenbach 5e9a225881 Debugging github workflow pipeline 2026-01-19 18:38:34 +01:00
kevinveenbirkenbach c92aff464b feat(ci): add min_storage validation and CI filtering with warnings
- Add sufficient_storage CLI for validating docker.services.<entity>.min_storage
- Introduce role_resource_validation utility with human-friendly size parsing
- Filter CI app discovery by available runner storage (default: 12GB)
- Emit GitHub Actions warnings for:
  - missing min_storage metadata (treated as 0GB)
  - roles exceeding available runner storage
- Add BigBlueButton min_storage metadata (50GB)
- Add unit tests for validation logic and CLI behavior
- Add humanfriendly dependency for size parsing

https://chatgpt.com/share/696e097b-1038-800f-b8fc-23e9dadfa021
2026-01-19 11:37:28 +01:00
kevinveenbirkenbach 72929e83fc feat(shopware,credentials): add strong OpenSearch admin password generation
- add strong_password generator with special characters
- introduce opensearch_initial_admin_password credential
- wire OpenSearch admin password via env template
- decouple OpenSearch admin password from Shopware admin user
- minor formatting cleanup in service resolver
2026-01-18 23:33:19 +01:00
kevinveenbirkenbach cf216014e3 refactor(cli): introduce combined role resolution and reorganize meta resolvers
- add cli.meta.applications.resolution.combined to resolve run_after + app-only dependencies
- add optional --tree output for combined resolution
- add cli.meta.applications.resolution.dependencies (app-only) resolver
- move run_after resolver to cli.meta.applications.resolution.run_after
- update test deploy dependency resolver to use combined module
- add unit tests for combined/dependencies/run_after resolvers
- minor cleanup: remove stray header comment, fix newline in vars, tidy YAML formatting

https://chatgpt.com/share/696ca531-9644-800f-98c0-bae58c0aff41
2026-01-18 10:17:26 +01:00
kevinveenbirkenbach 66d50e2dde feat(inventory): resolve shared providers transitively and support schema-less roles
- Allow credentials generator to run for roles without schema/main.yml so
  transitive config-based generation still works.
- Make InventoryManager resilient to missing YAML by defaulting to {} and
  only loading schema when schema/main.yml exists.
- Add recursive shared-provider include resolution based on docker.services
  config and apply provider schemas/special rules transitively.
- Require database_password injection only when database.enabled=true and shared=true.
- Update unit/integration tests to create required files for .exists() checks and
  validate transitive provider role credential generation.

https://chatgpt.com/share/69639d93-4c10-800f-bc6c-8e5b9fb75088
2026-01-11 13:54:37 +01:00
kevinveenbirkenbach e4baa6d7ab Ruff 2026-01-11 01:01:44 +01:00
kevinveenbirkenbach 64cab86be3 refactor(inventory): extract secret generation into ValueGenerator and add integration test
- Move generate_value/generate_secure_alphanumeric out of InventoryManager into new ValueGenerator
- Wire InventoryManager to use self.value_generator for all secret generation
- Tighten schema include logic for shared databases: require enabled=true and shared=true
- Update unit tests to patch ValueGenerator.generate_value instead of InventoryManager.generate_value
- Add end-to-end integration test for InventoryManager using real files and a fake VaultHandler
- Remove redundant legacy unit test file and add dedicated ValueGenerator unit tests

https://chatgpt.com/share/6962d2e6-7fdc-800f-ba83-9e150b19a5f0
2026-01-11 00:56:18 +01:00
kevinveenbirkenbach 39f7f8fbc7 feat(create-credentials): generate shared provider app credentials from role schemas
Extend credentials generator to include schemas for shared provider roles
(OpenLDAP, Keycloak, Matomo, and svc-db-<type>) based on docker.services.*.shared
flags in role config. Credentials are now emitted/added for all involved
applications while preserving existing inventory formatting, and CLI overrides
can target specific apps via applications.<app>.credentials.<key>.
2026-01-11 00:00:29 +01:00
kevinveenbirkenbach 3ce6eb348a refactor(inventory): switch feature flags to docker service config paths
Replace legacy feature flags (features.central_database, features.oauth2) with
docker service based configuration:

- docker.services.database.shared
- docker.services.oauth2.enabled

Update InventoryManager logic accordingly and adapt all unit tests to mock
the new config structure.

This ensures inventory generation now follows the canonical docker service
configuration model.

https://chatgpt.com/share/69628906-5efc-800f-999b-2ae3ece1907f
2026-01-10 18:14:29 +01:00
kevinveenbirkenbach d99c7e49a5 fix(ci): reintroduce lifecycle gating in deploy test runner
- Restore lifecycle-based role exclusion via cli.meta.roles.lifecycle_filter
- Make tested lifecycles configurable through TESTED_LIFECYCLES env
- Apply lifecycle gating consistently for workstation and server tests
- Fix minor bug in invokable parsing (avoid shadowing built-in list)
- Improve logging with lifecycle exclusion details

https://chatgpt.com/share/695fbcf4-2148-800f-8685-56ee73a9bae0
2026-01-08 15:19:26 +01:00
kevinveenbirkenbach 851caf9a3e refactor(valid_deploy_id): resolve roles directory from repo root and adapt tests
- Always derive roles/ path from repository root instead of accepting a parameter
- Fail fast if roles directory is missing or mislocated
- Add explicit typing and Path-based path handling
- Update unit tests to rely on real repo roles instead of temporary fixtures
- Ensure tests cover correct role discovery and inventory validation

https://chatgpt.com/share/695fb926-1f5c-800f-9012-e2922bb1df3f
2026-01-08 15:13:14 +01:00
kevinveenbirkenbach b547bec656 chore(debug): log roles directory used for deploy id validation
- Print effective roles_dir in ValidDeployId to simplify CI debugging
- Helps diagnose invalid application_id errors caused by wrong working directory

https://chatgpt.com/share/695fb926-1f5c-800f-9012-e2922bb1df3f
2026-01-08 15:03:10 +01:00