Commit Graph
104 Commits
Author SHA1 Message Date
kevinveenbirkenbach 8a75959c11 Merge branch 'main' into feature/makefile-wsl2
# Conflicts:
#	.github/workflows/test-development.yml
#	Makefile
#	roles/svc-db-postgres/files/set_postgres_superuser_password.sh
#	scripts/administration/apparmor/restore.sh
#	scripts/administration/apparmor/teardown.sh
#	scripts/dns/setup.sh
#	scripts/install/package.sh
#	scripts/install/venv.sh
#	scripts/tests/development.sh
2026-03-24 20:20:27 +01:00
Alejandro Roman 954807e195 fix lint issues 2026-03-21 16:08:28 +01:00
Alejandro Roman 5018ecf145 fix all windows issues with the app + more robust for all 2026-03-21 16:08:28 +01:00
Alejandro Roman da6e87191b fix(makefile-wsl): Fix the tesl app error and the ca trust 2026-03-21 16:08:28 +01:00
kevinveenbirkenbach 19c72c6b25 fix(postgres): make EXIT trap shellcheck-compliant 2026-03-20 16:12:04 +01:00
kevinveenbirkenbach 4efdef8208 Add min_storage entries for warned roles 2026-02-27 09:55:43 +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 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 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 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 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 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 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 7bb15d1b5e refactor(container): rename docker-container/docker services to sys-svc-container and update all references, schedules, tests, and templates
https://chatgpt.com/share/6985b09d-8ff8-800f-800c-7a694c0983e2
2026-02-06 10:12:31 +01:00
kevinveenbirkenbach 51239968fd refactor: rename docker-compose roles to sys-svc-compose and update paths
Renamed docker-compose and docker-compose-ca roles to sys-svc-compose and sys-svc-compose-ca, updated template includes, handlers, lookups, tests, and variables, and moved compose instances to /opt/compose.

https://chatgpt.com/share/6985ab2c-8344-800f-9e9a-768f562d138d
2026-02-06 09:49:42 +01:00
kevinveenbirkenbach 2d2e218fe5 Solved templating warnings 2026-02-05 11:00:34 +01:00
kevinveenbirkenbach 8a81630391 Added newline at file and POSIX compatible 2026-02-04 19:49:56 +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 3e39f123ce Linebreak 2026-02-04 01:16:44 +01:00
kevinveenbirkenbach fe9cdfb855 feat(images): standardize custom image tagging across roles
Normalize `*_CUSTOM_IMAGE` variables to the consistent pattern `{{ entity_name }}_custom:<version-or-ref>` (including SuiteCRM app version) and update MediaWiki to build a tool-preloaded custom image, removing runtime apt/composer provisioning.

https://chatgpt.com/share/697fa459-abbc-800f-954d-b18848890ff6
2026-02-01 20:06:52 +01:00
kevinveenbirkenbach 152a576957 Make PostgreSQL startup wait idempotent by replacing init log markers with container state and SQL readiness checks
https://chatgpt.com/share/697e4312-610c-800f-977c-2946fdea48f8
2026-01-31 18:59:40 +01:00
kevinveenbirkenbach 9e3f4b9187 svc-db-postgres: fix race condition during initial Postgres startup
Wait explicitly for the Docker entrypoint init phase to complete by
checking the log marker before running any SQL commands. Then verify
database readiness with a real SQL roundtrip instead of pg_isready.

This avoids a race condition where pg_isready reports success while
the temporary init server is already shutting down, which caused
intermittent failures during initial deployment (especially with
PostGIS enabled).

https://chatgpt.com/share/697e3a68-e56c-800f-8438-6edb2a956802
2026-01-31 18:22:24 +01:00
kevinveenbirkenbach 59b2d09eb7 fix(shellcheck): suppress false-positive for trap-invoked function
SC2329 is a known ShellCheck limitation for functions invoked via trap.

https://chatgpt.com/share/69755296-2d74-800f-8675-261a283e3782
2026-01-25 00:18:35 +01:00
kevinveenbirkenbach db2a9a6539 fix(shellcheck): address unused loop var and trap false positive
- Replace seq-based loop with brace expansion to avoid unused variable warning
- Use quoted trap handler so ShellCheck detects restore_hba invocation

https://chatgpt.com/share/69755296-2d74-800f-8675-261a283e3782
2026-01-25 00:15:27 +01:00
kevinveenbirkenbach 383a59e9a1 feat(svc-db-postgres): robust superuser password rotation via script with explicit auth verification
- replace Python helper with Bash script executed via ansible.script
- wait for postgres readiness inside container (pg_isready)
- explicitly verify password auth via temporary pg_hba override
- distinguish CHANGED / UNCHANGED / ALREADY OK states
- map script result deterministically to Ansible changed/failed logic
- remove legacy postgres_set_superuser_password.py

https://chatgpt.com/share/69754a74-9d18-800f-89a6-304b083fbe50
2026-01-24 23:40:47 +01:00
kevinveenbirkenbach 9b567a2f0e feat(postgres): ensure superuser password idempotently via helper script
Add a Python helper script to ensure the postgres superuser password inside
the Docker container without shell/SQL quoting issues.

The script:
- checks whether the password already works
- updates it only if necessary
- signals change state via exit codes (0 = unchanged, 2 = changed)

The role now calls the script via ansible.builtin.script and maps rc to
changed/failed correctly.

https://chatgpt.com/share/697528b6-79f4-800f-96c9-da993feff9b9
2026-01-24 21:16:47 +01:00
kevinveenbirkenbach 8b1ae03e77 fix(env): prevent dotenv_quote double-quoting in env.j2 templates
- Replace `"{{ ... | dotenv_quote }}"` with `{{ ... | dotenv_quote }}` across roles
- Update integration test to enforce pure Jinja + dotenv_quote and forbid wrapped quotes

https://chatgpt.com/share/6974e6c6-51b8-800f-80a1-a76f885cf57e
2026-01-24 16:35:27 +01:00
kevinveenbirkenbach 737adaa567 fix(shell): quote all password variables in shell tasks
Ensure all password usages in shell commands are safely quoted using the
`| quote` filter to prevent shell injection issues and test failures.

Affected roles:
- svc-db-postgres
- web-app-gitea
- web-app-mediawiki
- web-app-moodle
- web-app-shopware
- web-app-xwiki

https://chatgpt.com/share/6974dd33-9470-800f-b469-d31fabcd59e1
2026-01-24 15:54:29 +01:00
kevinveenbirkenbach fdb2683ddb test(env): enforce dotenv_quote + double quotes for password vars in env.j2 templates
https://chatgpt.com/share/6974cbac-023c-800f-8198-fd85df2aa7bc
2026-01-24 15:32:33 +01:00
kevinveenbirkenbach aa7d0c642c feat(dotenv): add dotenv_quote filter and enforce quoted password vars in env.j2
https://chatgpt.com/share/6974cbac-023c-800f-8198-fd85df2aa7bc
2026-01-24 15:22:19 +01:00
kevinveenbirkenbach b6c2dd01c8 fix(postgres): replace pg_isready with real TCP auth wait and add log dump on failure
- Replace pg_isready with psql TCP password authentication check
- Eliminate Postgres init race condition in CI
- Add rescue handler dumping last 200 container log lines on failure

https://chatgpt.com/share/696f4386-fbbc-800f-bdde-f1e6c4145c84
2026-01-20 11:38:15 +01:00
kevinveenbirkenbach 6c50831456 fix(postgres): avoid jinja/go-template collision in debug rescue block
Replace inline lookup('pipe', 'docker info -f {{.DockerRootDir}}') with a raw shell task
to prevent Jinja parsing errors ("unexpected '.'") during rescue debugging.

https://chatgpt.com/share/696f4386-fbbc-800f-bdde-f1e6c4145c84
2026-01-20 11:22:23 +01:00
kevinveenbirkenbach 7272c3d56c fix(postgres): escape docker inspect go-templates in rescue debug
- Replace jinja-colliding docker inspect formats with raw-escaped go-templates
- Keep POSTGRES_CONTAINER rendered by Ansible while preserving Docker templates
- Improve reliability and readability of rescue debug output

https://chatgpt.com/share/696f4386-fbbc-800f-bdde-f1e6c4145c84
2026-01-20 10:40:01 +01:00
kevinveenbirkenbach e10a000291 fix(ci,postgres): stabilize GitHub runner env, move docker to /mnt, add deep debug for role login
- Introduce deterministic RUNNING_ON_GITHUB / RUNNING_ON_ACT detection
- Move Docker data-root to /mnt on real GitHub runners only
- Switch POSTGRES_PASSWORD schema from bcrypt to alphanumeric (avoid $ interpolation)
- Add robust rescue/debug block for ALTER ROLE login step
  (docker inspect, logs, pg_isready, psql auth, hba, activity, roles)
- Make docker-on-mnt deterministic (no migration, root-dir assertion)

Fixes flaky CI runs and intermittent PostgreSQL authentication failures.

https://chatgpt.com/share/696f4386-fbbc-800f-bdde-f1e6c4145c84
2026-01-20 09:57:32 +01:00
kevinveenbirkenbach c4fcd2b634 Added meta data for MariaDB and Postgres 2026-01-18 21:28:03 +01:00
kevinveenbirkenbach 79a1780a89 Removed unnecessary volume definitions 2026-01-18 20:47:22 +01:00
kevinveenbirkenbach 34b94b7059 More explicit overwritting to harden postgres 2026-01-18 20:01:58 +01:00
kevinveenbirkenbach b71a3fa6cd Hopes this solves Ci/CD postgres bug 2026-01-18 19:52:26 +01:00
kevinveenbirkenbach 9b87089bb0 Assert application_id integrity in svc-db-postgres init and harden load_app debug output
Add a defensive assertion in svc-db-postgres init to ensure application_id scope
is not polluted by upstream loaders.

Also normalize load_app debug output formatting and add a no-op hardening step
to make variable intent explicit for future scope-guarding refactors.

https://chatgpt.com/share/696ce9ee-68ac-800f-9ea0-d73c285af9a8
2026-01-18 18:20:04 +01:00
kevinveenbirkenbach bf1b12a489 fix(postgres): bind exposed port to docker bind host instead of localhost
Expose Postgres via DOCKER_BIND_HOST instead of POSTGRES_LOCAL_HOST to ensure
the port is reachable from the infinito container when running Docker-in-Docker
in CI/CD environments.

This avoids binding the published port to the container loopback interface
(127.0.0.1), which is not reachable from sibling containers.

https://chatgpt.com/share/696ce9ee-68ac-800f-9ea0-d73c285af9a8
2026-01-18 15:10:30 +01:00
kevinveenbirkenbach 66aec3b577 refactor(docker-compose): generate volumes via compose_volumes filter
Replace legacy volumes*.yml.j2 includes with the new compose_volumes filter across roles.
Add YAML-safe serialization for Ansible/Jinja proxy types to avoid PyYAML representer errors.
Remove obsolete volumes templates and extend unit tests to enforce required database_volume behavior.

https://chatgpt.com/share/696c2722-fd30-800f-bf01-dfcd3cb7ba72
2026-01-18 01:19:31 +01:00
kevinveenbirkenbach 89cc377d38 refactor(rdbms): fix recursive variable resolution by introducing database_consumer_id
- Replace database_application_id with database_consumer_id
- Use explicit consumer context for database resolution
- Fix recursive Jinja variable loop in sys-svc-rdbms
- Decouple discourse database network from global database_type

https://chatgpt.com/share/696bd40d-ebfc-800f-9ba8-1e6be919a629
2026-01-17 19:25:12 +01:00
kevinveenbirkenbach c104867735 Changed License to Infinito.Nexus Community License (Non-Commercial) 2026-01-17 18:26:05 +01:00
kevinveenbirkenbach c83a432e19 Optimized OpenLDAP loading and python installation procedures 2026-01-12 15:36:18 +01:00
kevinveenbirkenbach 023d44fcac fix(svc-db-postgres): install psycopg2 via pip for Ansible interpreter
Replace distro-specific python-psycopg2 package with psycopg2-binary installed
via ansible.builtin.pip to ensure the PostgreSQL modules work with the active
Ansible Python interpreter (e.g. Infinito venv) across all distros.

https://chatgpt.com/share/6962ff13-afa0-800f-93a1-9b0d306d98e2
2026-01-11 02:38:18 +01:00