Commit Graph
260 Commits
Author SHA1 Message Date
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 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 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 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 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 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 48237d758c Rename nginx_paths lookup to nginx and update all references
* Rename lookup plugin: lookup_plugins/nginx_paths.py -> lookup_plugins/nginx.py
* Update lookup usage from lookup('nginx_paths', ...) to lookup('nginx', ...) across roles/templates/vars
* Update unit tests accordingly (imports + patch targets)

https://chatgpt.com/share/6985e705-4040-800f-a779-347f06e46f82
2026-02-06 14:05:04 +01:00
kevinveenbirkenbach 5e33e70892 refactor(database lookup usage): switch conditionals to enabled flag
Replace indirect type!='' checks with explicit database.enabled lookups
to improve semantics, readability, and alignment with strict lookup API.

https://chatgpt.com/share/6985d642-b40c-800f-9cdf-ed54fc484a92
2026-02-06 13:25:37 +01:00
kevinveenbirkenbach 8fe6b92e63 refactor(lookups): migrate nginx_paths, tls_resolve and cert_plan to strict positional want-path API
- Replace legacy want= keyword usage with mandatory positional want-path
- Align all nginx_paths, tls_resolve and cert_plan lookups to strict API
- Keep behavior unchanged while enforcing consistent lookup semantics

https://chatgpt.com/share/6985d642-b40c-800f-9cdf-ed54fc484a92
2026-02-06 13:06:09 +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 26a5b159e0 refactor(docker-lookup): replace want= syntax with path-based access
- Replace lookup('docker', ..., want='...') with lookup('docker', ..., 'path')
- Allow both top-level keys (directories/files) and dotted paths
- Simplify docker lookup API and reduce lazy dict propagation
- Update unit tests to reflect new lookup semantics

https://chatgpt.com/share/6984ccea-8290-800f-a6d7-ec0e94df95a0
2026-02-05 18:45:43 +01:00
kevinveenbirkenbach 56aea31667 refactor(docker): replace docker_compose vars with docker lookup across roles
Remove implicit docker_compose variable usage and resolve all docker paths
(files, directories, env) via lookup('docker', application_id).
This prevents scope leakage, centralizes path resolution, and makes docker
context deterministic across roles and handlers.

https://chatgpt.com/share/6984ccea-8290-800f-a6d7-ec0e94df95a0
2026-02-05 18:15:10 +01:00
kevinveenbirkenbach c4b08324a5 refactor(templates): use database lookup want= for volume/host access
Replace attribute-style access (lookup('database', app).volume/.host/etc.)
with explicit want= lookups across docker-compose and matrix templates
to align with updated database lookup plugin interface.

https://chatgpt.com/share/6983ddfd-aee4-800f-bce9-18eca2144f25
2026-02-05 01:01:55 +01:00
kevinveenbirkenbach 0ca96ce47d refactor: use database lookup in compose volumes 2026-02-05 00:41:26 +01:00
kevinveenbirkenbach d542817f02 - replace database_* usages in templates and vars
- switch to lookup('database', application_id)
- keep behavior consistent for central/shared DBs
2026-02-05 00:33:22 +01:00
kevinveenbirkenbach 8a81630391 Added newline at file and POSIX compatible 2026-02-04 19:49:56 +01:00
kevinveenbirkenbach 64b902fcbf Updated image and version to make it mirror compatible 2026-02-03 01:38:43 +01:00
kevinveenbirkenbach 82e2cde747 refactor(nginx): replace NGINX vars with nginx_paths lookup and add http/https support
- Drop legacy NGINX path definitions from group_vars
- Add nginx_paths lookup plugin (paths + ensure dirs + http_includes)
- Update roles/templates to use nginx_paths for config/data/cache/user paths
- Add per-domain HTTP->HTTPS redirect + ACME challenge include
- Add unit tests for nginx_paths lookup
- Clean up obsolete sys-svc-letsencrypt role files

https://chatgpt.com/share/697d4466-af54-800f-a243-b28367638c85
2026-01-31 00:52:42 +01:00
kevinveenbirkenbach ddb210b294 feat(users): add firstname/lastname to generated users and LDAP entries
- Generate firstname and lastname fields in CLI user setup
- Add meaningful default description including primary domain
- Pass firstname/lastname explicitly to OpenLDAP givenName/sn
- Remove LDAP-side fallbacks to item.key to ensure consistent user data

https://chatgpt.com/share/6978d573-a8c4-800f-8670-c9344f594a3a
2026-01-27 16:10:26 +01:00
kevinveenbirkenbach 5a5c14bb65 refactor(identity): split full_name into firstname/lastname and unify LDAP password handling
- Replace users.*.full_name with firstname/lastname across inventory and roles
- Update desk-git configuration to use firstname + lastname for author identity
- Refactor OpenLDAP user provisioning:
  - Stop setting userPassword via ldap_entry
  - Always set passwords via ldap_passwd (server-side SSHA hashing)
  - Add givenName support and align attributes with inetOrgPerson
- Improve administrator user metadata and descriptions

https://chatgpt.com/share/6978cebb-3c9c-800f-ac1b-d67920a9cb23
2026-01-27 15:41:58 +01:00
kevinveenbirkenbach 914a09882f Set openldap service name to entity_name 2026-01-27 13:28:36 +01:00
kevinveenbirkenbach 0afaabc494 feat(openldap): make env vars mandatory and enable configurable slapd logging
- Enforce required LDAP_* environment variables (fail fast on startup)
- Add configurable LDAP_LOG_LEVEL for slapd runtime logging
- Enable detailed stats logging in debug mode, stats in normal mode
- Route slapd logs to stdout for docker logs visibility

https://chatgpt.com/share/69773341-01ac-800f-8d0e-429398b6dcc5
2026-01-26 10:26:07 +01:00
kevinveenbirkenbach 54ad6a501b refactor(tls): split tls layer into orchestrator + providers
https://chatgpt.com/share/697286d6-d400-800f-a67b-425981fa5781
2026-01-22 21:21:34 +01:00
kevinveenbirkenbach 9fdb0cddd0 Replace global WEB_PROTOCOL / WEB_PORT / WEBSOCKET_PROTOCOL logic
with explicit per-application TLS resolution.

Key changes:
- Introduce sys-front-tls-layer as the single TLS abstraction
- Centralize certificate paths via TLS_CERT_FILE / TLS_KEY_FILE / TLS_CA_FILE
- Replace sys-svc-letsencrypt SSL templates with generic TLS layer includes
- Add tls_* Jinja filters (enabled, mode, protocol, port, websocket)
- Resolve TLS mode per application (letsencrypt | self_signed | off)
- Remove implicit defaults and WEB_* globals to fail fast on misconfiguration
- Support self-signed certificates with SAN awareness
- Make TLS behavior explicit and consistent across all roles

This decouples application logic from certificate providers and
allows switching TLS flavor without touching app roles.

https://chatgpt.com/share/69727c61-8e68-800f-a267-473a7e627978
2026-01-22 20:36:49 +01:00
kevinveenbirkenbach 8d3fe20d5f fix(openproject): stabilize startup, cap rails threads, run migrations before settings
- ensure OpenProject runs in production mode only
- wait for web container before applying settings
- run pending migrations automatically before rails runner
- apply settings via rails runner stdin (robust quoting & booleans)
- introduce thread/db pool cap to prevent OOM (OPENPROJECT_DB_POOL / RAILS_MAX_THREADS)
- fix admin creation runner env handling
- wire application_id correctly into docker roles
- disable unnecessary git pull for openldap docker role
- remove obsolete Development.md

This prevents OpenProject boot crashes caused by excessive thread/db pools
derived from dynamic Postgres sizing and makes role execution deterministic.

https://chatgpt.com/share/697135bd-7630-800f-8e1b-573305df86f6
2026-01-21 21:23:15 +01:00
kevinveenbirkenbach 5e097c02f1 fix(shellcheck): address lint findings across scripts
- openldap: use find instead of ls for module path detection
- docker-volumes health: robust whitelist parsing + quote vars
- btrfs health: quote path
- docker CLI installer: silence SC2031 false-positive for /etc/os-release vars
- test-dns: use loop counter
- chess: require APP_KEY_FILE env
- espocrm: log normalized seed flags to avoid unused vars
- shopware: disable SC2016 for php -r blocks (PHP vars in single quotes)
- fix script: add shebang + strict mode

https://chatgpt.com/share/69712026-7288-800f-b1d0-701e31754362
2026-01-21 19:51:12 +01:00
kevinveenbirkenbach f7be4456e6 web-app-mediawiki: add bootstrap installer via one-shot container and fix fresh DB init
- Rename 01_install.yml to 01_configuration.yml
- Add bootstrap installer (03_install.yml) using one-shot mediawiki container
  to initialize empty databases without LocalSettings mount
- Remove legacy update-only task (03_update.yml)
- Always run update after bootstrap/install
- Add MEDIAWIKI_NETWORK_DATABASE variable for DB network binding
- Add administrator_password credential to schema
- Switch admin password to managed application credential

https://chatgpt.com/share/696eb7cc-98dc-800f-82a6-f6236e0c03b7
2026-01-20 00:01:54 +01:00
kevinveenbirkenbach 7c10cb6fe5 fix(openldap,keycloak): allow user binds and enable LDAP debug logging
- allow simple bind for normal LDAP users (userPassword access rules)
- relax generic read access for directory browsing
- enable Keycloak LDAP and LDAPSDK debug logging
- normalize database config formatting

https://chatgpt.com/share/696cefa5-e308-800f-aef6-fc71cc9a811e
2026-01-18 15:35:10 +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 1c3b20cbad **svc-db-openldap: preload memberof/refint modules during bootstrap**
Load `memberof` and `refint` in `slapd.conf` before generating `cn=config` via `slaptest`, so the `memberOf` attribute is known and user entry updates no longer fail with “entry update failed”.

https://chatgpt.com/share/696be95b-68cc-800f-a883-fe2755a0a6cc
2026-01-17 20:55:57 +01:00
kevinveenbirkenbach c104867735 Changed License to Infinito.Nexus Community License (Non-Commercial) 2026-01-17 18:26:05 +01:00
kevinveenbirkenbach 8125f3351b Introduced throtteling for LDAP user updates 2026-01-17 18:10:50 +01:00
kevinveenbirkenbach 357a9bda83 fix(users): normalize reserved flag handling and align CLI/tests
- Always emit reserved flag in generated users (default: false)
- Do not override existing user definitions via --reserved-usernames
- Normalize description default to empty string
- Align unit tests with new reserved semantics
- Fix YAML quoting and trailing newline issues
- Clean up minor formatting and config inconsistencies

https://chatgpt.com/share/696bb761-0048-800f-9cf7-aebd3fda75be
2026-01-17 17:22:50 +01:00
kevinveenbirkenbach 548f98ab0a Optimized description 2026-01-17 13:07:55 +01:00
kevinveenbirkenbach 743716ffe6 fix(ldap,rbac,keycloak): ensure empty groupOfNames roles via placeholder member and DN-based mapping
- Add LDAP.RBAC.EMPTY_MEMBER_DN placeholder for empty role groups (schema-compliant groupOfNames)
- Ensure RBAC role entries always contain at least one member
- Align users OU attribute with DN (ou=users)
- Switch Keycloak LDAP group/role mappers to DN-based membership
- Fix missing newline in Keycloak schema file

https://chatgpt.com/share/696b7226-7c18-800f-a0b0-59068bb69d9f
2026-01-17 12:27:22 +01:00
kevinveenbirkenbach 505af3e2ad cli: make --log require explicit directory and create parents automatically
- Change --log flag to require explicit log directory (--log <LOG_DIR>)
- Automatically create log directory with parents=True
- Harden permissions best-effort (0700)
- Update CLI help text accordingly
- Adjust Makefile test targets to pass explicit log directory
- Ignore logs/ via .gitignore and .dockerignore
- Refactor flag parsing to correctly detect deploy with --log
- Add dedicated logging unit tests
- Update existing tests for new log semantics
- Remove deprecated -i alias for --id in deploy command

https://chatgpt.com/share/6969680a-dbf8-800f-aafb-3d32d6212ba0
2026-01-15 23:19:31 +01:00
kevinveenbirkenbach 60a9fb7393 **fix(openldap): allow RootDN manage access to cn=config for schema tooling**
Grant `${LDAP_ROOT_DN}` manage rights on the `config` database (in addition to SASL EXTERNAL) so tools like `ldapsm` can read/write `cn=config` over LDAP and no longer fail with “No such object”.

https://chatgpt.com/share/6966da0f-b458-800f-8e40-97a919b976f5
2026-01-14 01:08:44 +01:00
kevinveenbirkenbach 5722311071 fix(openldap): normalize cn=config DNs for module and backend entries
- Normalize OPENLDAP_MODULE_DN to always include ,cn=config suffix
- Normalize OPENLDAP_DATA_BACKEND_DN to always include ,cn=config suffix
- Prevent ldapmodify/ldapadd failures due to missing superior DN

https://chatgpt.com/share/6966dc9d-03c8-800f-a9c7-e6d479694bb3
2026-01-14 01:00:21 +01:00
kevinveenbirkenbach 9639496280 fix(openldap): add config backend to slapd.conf and read module DN from filesystem
- Add explicit `database config` backend so cn=config is accessible via ldapi
- Fix access rules for EXTERNAL SASL on cn=config
- Resolve module DN from /etc/ldap/slapd.d instead of ldapsearch
- Simplify docker-compose role inclusion and network wiring

https://chatgpt.com/share/6966da0f-b458-800f-8e40-97a919b976f5
2026-01-14 00:49:32 +01:00
kevinveenbirkenbach 77c3e6b9fa fix(openldap): robust bootstrap via slaptest, deterministic MDB init, and hardened runtime perms
- Rework Docker image to start from a clean slapd.d and data dir
- Bootstrap cn=config via slaptest from generated slapd.conf
- Deterministic MDB initialization (creates data.mdb on first start)
- Enforce correct ownership and permissions for slapd, config, and DB
- Add logging and fatal guards for broken bootstrap states
- Make memberof check optional in healthcheck
- Ensure base LDAP tree and OUs via Ansible (root, people, groups, roles)
- Cleanup Docker hardening vars

Result: stable, reproducible OpenLDAP container startup with clean volumes.

https://chatgpt.com/share/6966b019-d604-800f-86c2-d6ee04129130
2026-01-13 21:50:20 +01:00
kevinveenbirkenbach ba015fad19 Solved openladap itnegration tests 2026-01-13 15:16:26 +01:00
kevinveenbirkenbach c03d6d056c Removed unnecessary variable 2026-01-13 05:49:46 +01:00
kevinveenbirkenbach 01d625aad3 **feat(openldap): replace Bitnami OpenLDAP with custom Debian image + ldapi EXTERNAL config**
Migrate `svc-db-openldap` from `bitnamilegacy/openldap` to a locally built `infinito/openldap:local` image (Debian bookworm-slim) with a bootstrap `entrypoint.sh` that initializes `slapd.d` and an MDB backend from `LDAP_SUFFIX/LDAP_ROOT_DN/LDAP_ROOT_PW`.

* Add Dockerfile + entrypoint + healthcheck scripts
* Persist config + data in separate volumes (`/etc/ldap/slapd.d`, `/var/lib/ldap`)
* Switch cn=config operations to `ldapi:///` with SASL EXTERNAL (`-Q -Y EXTERNAL`)
* Simplify env template to only `LDAP_SUFFIX`, `LDAP_ROOT_DN`, `LDAP_ROOT_PW`
* Refactor docker init into `02_docker.yml` and update compose template (build context)
* Update LDAP tasks/handlers to use `OPENLDAP_BIND_DN/OPENLDAP_BIND_PW`
* Remove outdated Bitnami-specific docs and credential reset logic

https://chatgpt.com/share/6965c921-3304-800f-9e8f-d2f10d273f1b
2026-01-13 05:24:25 +01:00
kevinveenbirkenbach a96cad9f96 fix(svc-db-openldap): use config admin bind for cn=config modifications
Bitnami OpenLDAP images do not allow write access to cn=config via
SASL/EXTERNAL (peercred), even when executed as root. This caused
"Insufficient access (50)" errors during module, overlay and password
configuration.

Switch all cn=config modifications (modules, overlays, olcRootPW) to
simple bind authentication using the configuration admin DN and password.

This makes LDAP provisioning reliable across all distros and CI runners.

https://chatgpt.com/share/696574b0-ebac-800f-aee6-dfd9b27d74cd
2026-01-12 23:24:40 +01:00
kevinveenbirkenbach 48b0bbb85e test(run_once): allow per-condition opt-out via inline pass marker
Add support for ignoring individual run_once_* when-conditions if the same
line contains the marker comment:

  # pass test_run_once_suffix_matches_role

This allows intentional cross-role run_once usage (e.g. shared provider
roles) without weakening the global schema enforcement.

Also document the exception behavior directly in the test.

https://chatgpt.com/share/69653e36-c058-800f-921d-b4af9014df04

fix(openldap): make memberof/refint provisioning idempotent and robust

Refactor OpenLDAP cn=config provisioning:
- load memberof and refint modules via ldapmodify
- add overlays via ldapadd with proper error handling
- make handlers idempotent (ignore duplicate/value-exists errors)
- dynamically resolve module DN and data backend DN (mdb/hdb)
- clean up legacy LDIF definitions

This fixes rc=80 handler failures and allows safe re-runs.

https://chatgpt.com/share/69653e42-e020-800f-a6c3-9c37ec5e8028
2026-01-12 19:32:14 +01:00
kevinveenbirkenbach 198a2fe3cf fix(ansible): enforce system python interpreter and install python-ldap via OS packages
- Stop auto-injecting ansible_python_interpreter from PYTHON env for localhost
- Set ansible_python_interpreter globally to /usr/bin/python3
- Add interpreter to sample inventory
- Remove role-local interpreter overrides
- Switch python-ldap installation to distro package (python-ldap / python3-ldap)
- Drop pip-based python-ldap installation to avoid venv/libldap mismatches

https://chatgpt.com/share/6964335a-29cc-800f-ae65-6a35c7cd2559
2026-01-12 14:48:53 +01:00
kevinveenbirkenbach 98d43d2581 Removed error ignoring because the silent bug makes debugging harder 2026-01-12 13:34:20 +01:00