Commit Graph
14682 Commits
Author SHA1 Message Date
kevinveenbirkenbach 10c059e508 Fix Moodle redeploy failure caused by trailing slash in wwwroot
- Strip trailing slash from CFG->wwwroot when patching config.php
- Prevent Moodle healthcheck failures on redeploy
- Remove duplicate config.php existence check

https://chatgpt.com/share/6987aeb9-06b4-800f-9f9e-e8fb9543f4f0
2026-02-07 22:28:44 +01:00
kevinveenbirkenbach afd432954c fix(web-app-snipe-it): ignore duplicate admin group attach on bootstrap
Register create-admin output and treat the known users_groups duplicate-entry
constraint as non-fatal while keeping other errors fail

https://chatgpt.com/share/6987ac5d-3504-800f-9dab-75300b520fac
2026-02-07 22:19:19 +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 05f0072a96 fix(cli): make invokable command patchable and forward args unchanged
- Import get_invokable_paths and get_non_invokable_paths at module level
  so unittest.mock.patch can replace them
- Forward roles_file and suffix unchanged to preserve CLI boundary
- Remove implicit default resolution from CLI
- Keep error handling and output behavior unchanged

https://chatgpt.com/share/6987a639-0f8c-800f-9ee0-70cff683aa56
2026-02-07 21:52:29 +01:00
kevinveenbirkenbach 7e6caf7613 Solved wrong parent root bug 2026-02-07 19:53:12 +01:00
kevinveenbirkenbach bf56d737b9 sys-ctl-bkp-docker-2-loc: simplify install tasks and bump backup tool
- Rename install task file from 02_install_routines.yml to 02_install.yml
  for clearer intent and consistency
- Update all include_tasks references accordingly
- Bump backup-docker-to-local from 1.6.0 to 1.7.0 to include latest fixes

https://chatgpt.com/share/69873720-d444-800f-99f7-f7799fc10c0b
2026-02-07 14:03:12 +01:00
kevinveenbirkenbach 64b0506947 refactor: replace raw docker usage with container wrapper across roles
Replace direct `docker` command usage, references, and documentation with
the `container` wrapper to ensure engine abstraction and future portability
(e.g. Docker → Podman).

This includes:
- Shell scripts, Ansible tasks, handlers, and Python helpers
- Documentation, comments, help texts, and meta descriptions
- Network, volume, system, and image operations
- Test expectations and comments

All runtime behavior remains unchanged while enforcing the repository-wide
rule to avoid raw Docker invocations.

https://chatgpt.com/share/698721c3-e270-800f-be7a-e4435fb54506
2026-02-07 12:57:26 +01:00
kevinveenbirkenbach 2c2a3f993c container: allow passthrough for any docker subcommand
Make the container wrapper future-proof by forwarding all non-`run`
subcommands directly to Docker. This removes the need to whitelist
individual Docker commands and enables seamless replacement of raw
`docker <cmd>` calls with `container <cmd>` across the repo.

https://chatgpt.com/share/698721c3-e270-800f-be7a-e4435fb54506
2026-02-07 12:27:56 +01:00
kevinveenbirkenbach 4adb4118d1 **test(integration): forbid raw docker CLI usage**
Enforce `container`/`compose` wrappers by scanning repo files for direct `docker …`, `docker compose …`, and `docker-compose …` command invocations (with allowlists + context matching) to keep engine switching (e.g., Docker ↔ Podman) cheap and centralized.

https://chatgpt.com/share/69871f14-9030-800f-996e-3e32d70c774d
2026-02-07 12:16:11 +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 74e070c30b Changed docker-compose to compose in meta files 2026-02-07 09:39:07 +01:00
kevinveenbirkenbach 8447ddc10a feat(sys-svc-compose): support -f/--file and append to autodetected compose files
https://chatgpt.com/share/69869046-8f78-800f-bdb9-0bd7d644ce4a
2026-02-07 02:07:01 +01:00
kevinveenbirkenbach 86533cbd2e refactor(container): use compose wrapper from PATH and drop hardcoded binary paths
- Replace hardcoded /usr/local/bin/compose with `compose` everywhere
- Remove explicit wrapper existence checks (PATH resolution is authoritative)
- Align hard/soft repair scripts and cert deploy helper with wrapper usage
- Update unit tests and paths after renaming docker → container roles
- Keep compose invocation consistent across scripts and tests

https://chatgpt.com/share/6986772f-d780-800f-8362-b5b66c6f33f2
2026-02-07 00:19:53 +01:00
kevinveenbirkenbach e7013815f3 web-app-snipe-it: harden LDAP setup and fix ShellCheck warnings
- Pass LDAP settings via environment instead of shell interpolation
- Use getenv() in PHP to avoid quoting issues and injection risks
- Properly handle base64-decoded LDAP bind password
- Explicitly disable SC2016 where single-quoted PHP code is intentional

https://chatgpt.com/share/69866fd2-e164-800f-bc7b-615120e58e15
2026-02-06 23:48:42 +01:00
kevinveenbirkenbach 9fa9692d7d refactor(compose): replace docker compose calls with compose wrapper
- Switch all docker compose invocations to the compose wrapper
- Update comments, task names, and log messages accordingly
- Simplify handlers and tasks to rely on wrapper-managed flags and env files
- Align tests and documentation with compose-based workflow

https://chatgpt.com/share/69866ede-be2c-800f-94b0-bffcf8fed260
2026-02-06 23:44:39 +01:00
kevinveenbirkenbach 5ad0ecfd99 refactor(compose): switch build calls to compose wrapper
Replace all `docker compose build` invocations with the `compose` wrapper
to ensure automatic env-file detection and override handling. Update
handlers, notify targets, direct commands, and log labels consistently
across roles.

https://chatgpt.com/share/69866b76-ce6c-800f-ac9e-dba6bba27008
2026-02-06 23:30:04 +01:00
kevinveenbirkenbach 0a7b4efa22 Replaced docker compose pull by compose pull 2026-02-06 23:26:20 +01:00
kevinveenbirkenbach c00384de0e replaced docker compose pull by compose pull 2026-02-06 23:24:32 +01:00
kevinveenbirkenbach 2d8ff31b54 Linebrea 2026-02-06 23:22:22 +01:00
kevinveenbirkenbach e3a16cbe8a refactor: switch docker CLI usage to container wrapper
- Replace direct docker calls with container wrapper across scripts, roles, and templates
- Add support for cp, start, stop, and restart passthrough commands
- Align handlers and notifications to container manager restart semantics
- Fix systemd ExecStartPost to use container wrapper without hardcoded paths
- Silence ShellCheck SC2016 false positive for container exec password injection
- Update tests and documentation strings to reflect container-based workflow

https://chatgpt.com/share/69866958-c88c-800f-9b4f-3a972615bf42
2026-02-06 23:21:02 +01:00
kevinveenbirkenbach c1d50d78da refactor(container): replace BIN_CONTAINER usages with system-wide container wrapper
https://chatgpt.com/share/698660b7-4c78-800f-b25f-af5408cff034
2026-02-06 23:00:21 +01:00
kevinveenbirkenbach ba35d7c5e0 refactor(container): replace docker ps usages with container wrapper and move binaries to /usr/bin
https://chatgpt.com/share/698660b7-4c78-800f-b25f-af5408cff034
2026-02-06 22:44:14 +01:00
kevinveenbirkenbach ddfbe001b2 Use container wrapper for logs in health checks and diagnostics
https://chatgpt.com/share/698659d9-62e4-800f-89a1-5d44f309bde4
2026-02-06 22:30:19 +01:00
kevinveenbirkenbach 2147690da0 Use container wrapper for docker logs across roles
https://chatgpt.com/share/698659d9-62e4-800f-89a1-5d44f309bde4
2026-02-06 22:28:38 +01:00
kevinveenbirkenbach 646bd80290 Expose CA_TRUST environment variables at play level for container wrapper
https://chatgpt.com/share/698659d9-62e4-800f-89a1-5d44f309bde4
2026-02-06 22:14:55 +01:00
kevinveenbirkenbach 46238d4c89 refactor: use BIN_CONTAINER wrapper for container exec commands
https://chatgpt.com/share/698657ee-e708-800f-ba5d-4c7c5198a5fe
2026-02-06 22:06:42 +01:00
kevinveenbirkenbach fb43b44240 hlth-csp: run CSP checker containers as one-shot (--rm)
Add --rm to container run so CSP checker containers are removed
automatically after completion. This prevents exited one-shot containers
from being picked up by repair/health logic and avoids false recovery
attempts.

Unit tests were updated to reflect the new --rm behavior.

https://chatgpt.com/share/6986525a-4b48-800f-b310-bb8b231121ec
2026-02-06 21:50:29 +01:00
kevinveenbirkenbach 04255cb372 rpr-container-soft: ignore non-compose containers when repairing exited/unhealthy
Filter docker ps by com.docker.compose.project label in STRICT mode so that
one-shot docker run containers are ignored. This prevents false repair
attempts and label lookup errors for containers without compose metadata.

Unit tests were updated to reflect the new compose-only prefilter behavior.

https://chatgpt.com/share/6986525a-4b48-800f-b310-bb8b231121ec
2026-02-06 21:43:01 +01:00
kevinveenbirkenbach f880b14696 sys-ca-selfsigned: manage global CA trust env vars for container wrapper
- Persist CA_TRUST_* variables in /etc/environment for self-signed TLS
- Remove CA trust environment when switching to letsencrypt
- Enable container.py to auto-detect CA injection context via env

https://chatgpt.com/share/69864bf2-7830-800f-ae8a-dad17c4f6e13
2026-02-06 21:29:40 +01:00
kevinveenbirkenbach 10043ebacf sys-svc-container: make CA injection soft-fail and extend unit tests
- Switch CA handling to soft-fail with warnings instead of hard exits
- Fallback to plain `docker run` when CA env vars or files are missing
- Avoid failing on images without ENTRYPOINT (warn + fallback)
- Simplify entrypoint inspect recovery logic (direct pull + retry)
- Refactor container wrapper structure and comments
- Extend unit tests to cover CA soft-fail and docker run fallback paths

https://chatgpt.com/share/69864bf2-7830-800f-ae8a-dad17c4f6e13
2026-02-06 21:15:42 +01:00
kevinveenbirkenbach 2950cca119 Solved escaping bug 2026-02-06 21:15:01 +01:00
kevinveenbirkenbach 63926b23b9 chore(container): replace direct docker inspect/run calls with container wrapper
https://chatgpt.com/share/698647e2-7b94-800f-814d-5eb63fe4e537
2026-02-06 20:58:17 +01:00
kevinveenbirkenbach 4055815a4e refactor: use BIN_COMPOSE consistently instead of inline docker compose calls
Replace hardcoded `docker compose {{ lookup('compose_file_args', ...) }}` usages
with `BIN_COMPOSE` across listmonk, mastodon, and snipe-it roles to centralize
compose invocation logic, ensure consistent override handling, and reduce
duplication.

Also align Snipe-IT admin tasks to dynamic user attributes and improve shell
robustness.

https://chatgpt.com/share/69864433-895c-800f-905b-b955495f3caf
2026-02-06 20:42:39 +01:00
kevinveenbirkenbach 20872431d6 rpr-container-soft: dump full docker inspect on missing compose labels
https://chatgpt.com/share/69864069-c394-800f-a492-8eb3dd13a015
2026-02-06 20:26:30 +01:00
kevinveenbirkenbach dc9a10a9ab Removed whitespace 2026-02-06 19:36:47 +01:00
kevinveenbirkenbach 259d885868 mail: prevent SMTP port 25 conflicts when Mailu is active
Ensure conflicting host SMTP components are disabled when Mailu
provides external SMTP. This refactors SMTP/MSMTP enable/disable
tasks, removes redundant package conflicts, and prepares for
robust port 25 handling to avoid Docker compose startup failures.

https://chatgpt.com/share/69863260-c4e4-800f-adbd-67f87c091264
2026-02-06 19:26:34 +01:00
kevinveenbirkenbach e8f62dfa7c Solved reset bug 2026-02-06 18:02:24 +01:00
kevinveenbirkenbach 92a4cc0eaf Replaced _global by global 2026-02-06 17:57:12 +01:00
kevinveenbirkenbach b399253884 test(deploy): run dedicated_distro init and deploy inside development container
Move entry.sh, development init, and development deploy execution into the
development container via cli.deploy.development exec.

Deployment logic, arguments, and execution order remain unchanged.

https://chatgpt.com/share/69861572-9c74-800f-9f3f-904202371bbc
2026-02-06 17:22:38 +01:00
kevinveenbirkenbach eecc802f1b Solved mariadb path bug 2026-02-06 17:17:26 +01:00
kevinveenbirkenbach 6b53faedce refactor(config): complete remaining get_app_conf replacements
Replace remaining get_app_conf filter usages with the config lookup in
network templates, proxy vhost, desktop validation, and Nextcloud plugin
configs. Preserve previous default behavior.

https://chatgpt.com/share/69860678-cef8-800f-8402-7fe6231fdc2d
2026-02-06 16:33:42 +01:00
kevinveenbirkenbach ee204686b2 Removed legacy code 2026-02-06 16:30:35 +01:00
kevinveenbirkenbach 497986e309 fix(mariadb): correct config lookup arguments for image setting
Fix invalid lookup('config') call for MARIADB_IMAGE that passed an extra
argument. Other replacements from get_app_conf to config lookup are
correct and unchanged.

https://chatgpt.com/share/69860678-cef8-800f-8402-7fe6231fdc2d
2026-02-06 16:26:25 +01:00
kevinveenbirkenbach 3fa7887dc8 Added whitespaces for better readability 2026-02-06 16:21:10 +01:00
kevinveenbirkenbach 5100c2c1ce refactor(config): replace get_app_conf filter with config lookup
Replace usages of the get_app_conf filter with the config lookup plugin
across roles and templates. Adjust quoting where required to keep YAML
and Jinja syntax valid. No functional changes intended.

https://chatgpt.com/share/69860678-cef8-800f-8402-7fe6231fdc2d
2026-02-06 16:19:14 +01:00
kevinveenbirkenbach 7cb881183b refactor: remove implicit True flag from get_app_conf calls
The get_app_conf() helper no longer requires an explicit third
parameter to enable application-specific lookups. All templates,
tasks, and vars have been updated to rely on the new default behavior
by removing the redundant `True` argument.

This simplifies usage, improves readability, and enforces a consistent
API across Jinja2 templates and Ansible logic.

https://chatgpt.com/share/6985f5f6-c084-800f-887a-4a70d62e6dcf
2026-02-06 15:08:47 +01:00
kevinveenbirkenbach c2a5ee0e19 feat(lookup): add strict config lookup backed by applications variable
Introduce a `config` lookup plugin that exposes `get_app_conf` via Ansible
lookups, defaulting to strict mode and supporting an optional default value.

Add comprehensive unittest coverage validating strict behavior, defaults,
schema-defined but unset errors, index access, and argument validation.

https://chatgpt.com/share/6985f3f5-4660-800f-9e5d-2b518ccdff80
2026-02-06 15:00:13 +01:00
kevinveenbirkenbach 2d344fb129 refactor(domains): switch to domain() lookup across config and templates
Replace `domains | get_domain(...)` usage with `lookup('domain', ...)` throughout
group_vars, roles, and templates. Fix load_app domain resolution to use the
current application_id.

https://chatgpt.com/share/6985ef1e-11b8-800f-b231-52523055060b
2026-02-06 14:46:29 +01:00
kevinveenbirkenbach c9489eb5dd feat(lookup): add domain() lookup plugin with unit tests
Introduce a new Ansible lookup plugin `domain()` that resolves the primary
domain directly from the `domains` variable using only `application_id`.
Includes comprehensive unit tests covering string, list, dict, and error cases.

https://chatgpt.com/share/6985ef1e-11b8-800f-b231-52523055060b
2026-02-06 14:39:32 +01:00