25 Commits

Author SHA1 Message Date
7123841fb4 style: apply ruff autoformat 2025-12-17 16:37:21 +01:00
ec284cc765 fix(lint): resolve Ruff E701/E702 and exclude build artifacts
- Fix E701 by expanding single-line class and loop statements into blocks
- Fix E702 by splitting semicolon-separated statements
- Exclude build/, dist/, venv, and egg-info from Ruff linting
- Apply fixes consistently to source and generated files

No runtime behavior changes; lint-only cleanup to stabilize CI.

https://chatgpt.com/share/6942c9e3-80fc-800f-b471-5e1ee567f8fe
2025-12-17 16:18:53 +01:00
ee3e86684a lint: remove unused variables in module_utils and tests
https://chatgpt.com/share/6942c80f-c904-800f-8793-f804da1aa891
2025-12-17 16:10:58 +01:00
9e6256dc6e lint(test,core): remove misplaced test code and fix undefined names
- Import subprocess where used to fix F821 in cli/setup/applications
- Remove accidental test methods from RoleDependencyResolver implementation
- Remove invalid and non-discoverable test functions from test_role_dependency_resolver
- Eliminate test code that was never executed due to wrong scope/indentation
- Restore clear separation between production code and unit tests

https://chatgpt.com/share/6942c3ec-8a10-800f-9a15-c319f5e93089
2025-12-17 15:53:25 +01:00
9db66f6f98 Ruff autofix 2025-12-17 12:56:47 +01:00
da06943f29 Release version 0.3.0 2025-12-17 12:33:30 +01:00
0e89d89b45 Make sound support optional and guard against missing audio dependencies
- Move simpleaudio to optional dependency (audio extra)
- Add DummySound fallback when optional audio libs are unavailable
- Import simpleaudio/numpy lazily with ImportError handling
- Remove Docker-specific sound disabling logic
- Improve typing and robustness of sound utilities

https://chatgpt.com/share/693dec1d-60bc-800f-8ffe-3886a9c265bd
2025-12-13 23:43:36 +01:00
8a453be4b9 Removed unnecessary warning 2025-12-02 19:36:01 +01:00
c0e26275f8 Refactor defaults generation, credential creation, and inventory management
### Overview
This commit introduces a broad set of improvements across the defaults
generator, credential creation subsystem, inventory creation workflow,
and InventoryManager core logic.

### Major Changes
- Support empty or  config/main.yml in defaults generator and ensure that
  applications with empty configs are still included in defaults_applications.
- Add '--snippet' and '--allow-empty-plain' modes to create/credentials.py
  with non-destructive merging and correct plain-secret handling.
- Ensure empty strings for 'plain' credentials are never encrypted.
- Update InventoryManager to fully support allow_empty_plain and prevent
  accidental overwriting or encrypting existing VaultScalar or dict values.
- Add full-size implementation of cli/create/inventory.py including
  dynamic inventory building, role filtering, host_vars management, and
  parallelised credential snippet generation.
- Fix schemas (Magento, Nextcloud, OAuth2-Proxy, keyboard-color, etc.) to
  align with the new credential model and avoid test failures.
- Improve get_app_conf consistency by ensuring credentials.* paths are
  always resolvable for applications even when config/main.yml is empty.

### Added Test Coverage
- Unit tests for defaults generator handling empty configs.
- Full test suite for create/inventory.py including merge logic and
  vault-safe host_vars loading.
- Extensive tests for InventoryManager: plain-secret behavior,
  vault handling, and recursion logic.
- Update or remove outdated tests referencing old schema behaviour.

### Context
This commit is associated with a refactoring and debugging session documented here:
https://chatgpt.com/share/692ec0e1-5018-800f-b568-d09a53e9d0ee
2025-12-02 11:54:55 +01:00
d76e384ae3 Enhance CertUtils to return the newest matching certificate and add comprehensive unit tests
- Added run_openssl_dates() to extract notBefore/notAfter timestamps.
- Modified mapping logic to store multiple cert entries per SAN with metadata.
- find_cert_for_domain() now selects the newest certificate based on notBefore and mtime.
- Exact SAN matches take precedence over wildcard matches.
- Added new unit tests (test_cert_utils_newest.py) verifying freshness logic, fallback handling, and wildcard behavior.

Reference: https://chatgpt.com/share/68ef4b4c-41d4-800f-9e50-5da4b6be1105
2025-10-15 09:21:00 +02:00
ed73a37795 Improve get_app_conf robustness and add skip_missing_app parameter support
- Added new optional parameter 'skip_missing_app' to get_app_conf() in module_utils/config_utils.py to safely return defaults when applications are missing.
- Updated group_vars/all/00_general.yml and roles/web-app-nextcloud/config/main.yml to include skip_missing_app=True in all Nextcloud-related calls.
- Added comprehensive unit tests under tests/unit/module_utils/test_config_utils.py covering missing app handling, schema enforcement, nested lists, and index edge cases.

Ref: https://chatgpt.com/share/68ee6b5c-6db0-800f-bc20-d51470d7b39f
2025-10-14 17:25:37 +02:00
bcee1fecdf feat(inventory): add random_hex_32 generator
feat(bbb/schema): auto-generate etherpad_api_key; set fsesl_password to alphanumeric_32
test(unit): add InventoryManager tests (Option B) expecting feature-generated creds as plain strings
docs: full autocreation of credentials for BigBlueButton now enabled
See: https://chatgpt.com/share/68d69ee8-3fd4-800f-9209-60026b338934
2025-09-26 16:11:05 +02:00
b867a52471 Refactor and extend role dependency resolution:
- Introduced module_utils/role_dependency_resolver.py with full support for include_role, import_role, meta dependencies, and run_after.
- Refactored cli/build/tree.py to use RoleDependencyResolver (added toggles for include/import/dependencies/run_after).
- Extended filter_plugins/canonical_domains_map.py with optional 'recursive' mode (ignores run_after by design).
- Updated roles/web-app-nextcloud to properly include Collabora dependency.
- Added comprehensive unittests under tests/unit/module_utils for RoleDependencyResolver.

Ref: https://chatgpt.com/share/68a519c8-8e54-800f-83c0-be38546620d9
2025-08-20 02:42:07 +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
0074bcbd69 Implemented functioning warning sound 2025-08-10 17:39:33 +02:00
44e0fea0b2 Renamed cymais to infinito and did some other optimations and logout implementations 2025-07-29 16:35:42 +02:00
16c1a5d834 Refactored get_app_conf 2025-07-22 10:08:47 +02:00
d4fbdb409f Added missing sounds file from previous commit 2025-07-18 14:44:38 +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
cfeb8a5bf8 General optimations and refactorings in preparation for simpleicon role implementation 2025-07-06 14:54:31 +02:00
90f9d97c54 Last SAN optimations 2025-04-29 06:37:12 +02:00
d38d4204f8 Optimized cert speed, testing etc. 2025-04-29 05:16:55 +02:00
c950862b80 Solved wildcard redirect bug 2025-04-29 03:28:29 +02:00
e5e394d470 Optimized cloudflare implementation 2025-04-29 02:20:10 +02:00