Commit Graph

2546 Commits

Author SHA1 Message Date
986f959696 Refactor webserver proxy variables and fix BigBlueButton deployment behavior
Refactor proxy/webserver configuration variables to a consistent webserver_* naming scheme across roles. Replace legacy variables like proxy_extra_configuration, client_max_body_size, vhost_flavour, location_ws and ws_port with webserver_extra_configuration, webserver_client_max_body_size, webserver_vhost_flavour, webserver_websocket_location and webserver_websocket_port. Update NGINX vhost and location templates (html, upload, ws, basic, ws_generic) as well as callers (sys-front-inj-all, sys-stk-front-proxy, various web-app-* and web-svc-* roles) to use the new naming.

Tighten docker-compose Git repository handling by making docker_git_repository_pull depend on docker_git_repository_address being defined, a string and non-empty. This avoids accidental Git operations when the repository address is unset or of the wrong type.

Refactor the BigBlueButton role structure and fix deployment bugs: introduce 01_core.yml to orchestrate docker/proxy setup, database seeding, websocket map deployment, docker-compose overrides and admin/bootstrap logic in a single once-executed entrypoint. Rename supporting task files (02_docker-compose.yml, 03_administrator.yml, 04_dependencies.yml) and update tasks/main.yml to delegate via include_tasks with run_once_web_app_bigbluebutton. Improve Greenlight admin creation behavior by treating the 'Email has already been taken' error as a non-fatal, unchanged outcome and running user:set_admin_role as a fallback, both for the primary password and the OIDC starred-password path.

Also standardize vhost flavour selection for services like Mailu, Discourse, CDN, Collabora, Coturn, OnlyOffice, Simpleicons and web-svc-logout by explicitly passing webserver_vhost_flavour where needed and aligning client_max_body_size and websocket configuration with the new webserver_* variables.

Reference: ChatGPT conversation https://chatgpt.com/share/6931c530-bba8-800f-9997-dd61dc1d497b
2025-12-04 18:31:09 +01:00
86dd36930f Refactor MariaDB role to stabilize initialization:
- Unify encoding/collation variables
- Improve connection logic for mysql_db module
- Switch to PyMySQL install path to avoid mysqlclient build failures
- Update healthcheck to container-friendly CMD-SHELL usage
- Normalize network and port configuration

These changes were applied during CI/CD pipeline debugging. The root CI/CD connectivity issue is still not fixed.

Reference: https://chatgpt.com/share/6931adf0-ce7c-800f-86f3-f867fbd3191f
2025-12-04 16:52:43 +01:00
5f0dfa616f Optimized env variables 2025-12-04 15:13:24 +01:00
f147bbcc93 Optimized tag name 2025-12-04 15:12:50 +01:00
a0b6ff490d Cleaned up elk role - (not implemented yet, just draft) 2025-12-04 15:12:26 +01:00
91e93a5cc8 Solved BBB path bug 2025-12-04 15:11:40 +01:00
9051ba179f Optimized ESPOCRM and Moodle volumes 2025-12-04 14:10:53 +01:00
d0efc77b6c Optimized variable conditions for ansible update 2.18 -> 2.20 2025-12-04 12:24:01 +01:00
73ec220847 Added utils/load_handlers.yml required due to update 2.18 -> 2.20 2025-12-04 11:04:00 +01:00
e5a3c1f0e2 Solved 2.18 -> 2.20 condition update bug - https://chatgpt.com/share/69315bda-0b6c-800f-b093-e665c0bba255 2025-12-04 11:01:41 +01:00
4dbf58e082 Added DNS_PROVIDER condition 2025-12-04 11:00:03 +01:00
db68f16e19 Added vars wrapper for RDMBS 2025-12-04 10:58:05 +01:00
5999763b4e Optimized Spacing 2025-12-04 10:50:28 +01:00
fc0bdbea9a Implemented SSL_ENABLED 2025-12-04 10:48:45 +01:00
651038a7c5 Optimized TELEGRAM_BOT implementation 2025-12-04 10:35:45 +01:00
7847d5fddc Optimized spacing 2025-12-04 10:33:08 +01:00
770107ff1e Raised matomo ressources 2025-12-04 05:35:04 +01:00
093a44b59c General optimations 2025-12-04 04:17:24 +01:00
845b6e7cc1 Optimized docker compose flush logic 2025-12-04 04:16:17 +01:00
c128bd9c73 Removed deprecated function 2025-12-04 04:15:38 +01:00
5c67c42911 Restructured Handler Logic 2025-12-04 02:37:12 +01:00
fbeed5793f Solved ID bug 2025-12-04 02:35:42 +01:00
c0980e91c0 Fix CI Docker-in-Docker deployment, introduce vfs storage-driver, add inner dockerd bootstrap, enable portable json-file logging when running inside a container, and update workflow triggers for multi-branch testing.
Includes:
- Rewrite of test-deploy workflow to use isolated inner dockerd with privileged mode.
- Switch logging drivers to 'json-file' when IS_CONTAINER=true for compatibility with non-systemd CI runners.
- Adjust Dockerfile to install docker CLI and simplify package setup.
- Improve inventory creation and deploy steps for CI stability.
- Fully compatible with Ansible 2.20 variable handling.

Conversation reference:
https://chatgpt.com/share/6930e285-9604-800f-aad8-7a81c928548c
2025-12-04 02:24:10 +01:00
27c399123b Optimized handler loading. Requirerd due to 2.18->2.20 update 2025-12-04 00:53:27 +01:00
7b262cf46e Further app load optiomation due to 2.18->2.20 update 2025-12-03 23:05:35 +01:00
8fad77f17f Solved CDN and Logout deployment bugs existing due to 2.18->2.20 update 2025-12-03 22:45:48 +01:00
91d5ba35d1 Add container-aware execution logic and CI stability fixes
- Introduce global IS_CONTAINER flag based on ansible_virtualization facts
- Skip systemd-based handlers and tasks when running inside containers
- Extend EXCLUDED_ROLES list in GitHub Actions test-deploy workflow
- Ensure docker.sock is mounted for all CI deploy stages
- Improve sys-svc-docker by suppressing service restarts inside containers
- Add meta: flush_handlers to properly trigger delayed docker restarts
- Update sys-service handlers with container guards
- Update sys-timer tasks to avoid systemctl inside CI containers
- Enhance drv-non-free role with Manjaro detection and mhwd fallback warning
- Skip swapfile generation in containers
- Minor service template fixes and cleanup in proxy.conf.j2

Details and discussion: https://chatgpt.com/share/6930a4ca-56f4-800f-9b3d-4791f040a03b
2025-12-03 22:00:18 +01:00
84d3c8fc16 Optimized ignoring of LID driver 2025-12-03 20:07:02 +01:00
298ba80664 Added explicit variable names 2025-12-03 19:13:06 +01:00
c5e294e567 Made MariaDB local network public 2025-12-03 18:48:52 +01:00
40c40e2000 Minor performance optimations 2025-12-03 18:21:10 +01:00
031775c096 Removed redundancies and simplified run_once flag 2025-12-03 18:12:09 +01:00
379b1d420e Refactor MariaDB and PostgreSQL roles for Ansible 2.20 compatibility and Infinito.Nexus conventions
- Replace legacy docker_container-based MariaDB deployment with docker-compose based workflow
- Add custom Dockerfile and docker-compose templates for MariaDB
- Split MariaDB command into separate arguments to avoid entrypoint parsing errors
- Introduce MARIADB_CUSTOM_IMAGE and MARIADB_EXPOSE_LOCAL variables
- Add docker_compose_flush_handlers to ensure correct handler execution on first run
- Replace utils/once/finalize.yml with utils/once/flag.yml for new run-once semantics
- Align variable naming with Infinito.Nexus UPPERCASE conventions
- Fix PostgreSQL custom image variable name (POSTGRES_CUSTOM_IMAGE_NAME → POSTGRES_CUSTOM_IMAGE)
- Remove obsolete flush_handlers var injection in svc-db-postgres/tasks/main.yml
- General cleanup after migration from Ansible 2.18 → 2.20

Conversation reference:
https://chatgpt.com/share/69306c81-9934-800f-b317-f53a8f246a73
2025-12-03 18:00:30 +01:00
13d47766b7 Upercased MariaDB variables 2025-12-03 14:29:43 +01:00
1d0f26617a Optimized docker_git_repository_ variables 2025-12-03 14:23:53 +01:00
6f676462ea Solved escaping issue - https://chatgpt.com/share/69303513-df24-800f-994c-42c10c465b47 2025-12-03 14:03:33 +01:00
794bd4487a Changed from pacman to yay install 2025-12-03 13:27:30 +01:00
4a4c3c741c dev-yay: override Python interpreter for core tasks to ensure AUR builder compatibility
This change sets ansible_python_interpreter to /usr/bin/python3 when including
01_core.yml. It avoids permission issues when Ansible runs module-based tasks
as the non-privileged AUR builder user, since the virtualenv Python binary is
not executable for that user.

Context and discussion:
https://chatgpt.com/share/6930230d-d7e0-800f-a5dc-67d7f75020e5
2025-12-03 12:46:45 +01:00
716ebef33b Refactor task includes and update variable handling for Ansible 2.20 migration
This commit updates multiple roles to ensure compatibility with Ansible 2.20.
Several include paths and task-loading mechanisms required adjustments,
as Ansible 2.20 applies stricter evaluation rules for complex Jinja expressions
and no longer resolves certain relative include paths the way Ansible 2.18 did.

Key changes:
- Replaced legacy once_finalize.yml and once_flag.yml with the new structure
  under tasks/utils/once/finalize.yml and tasks/utils/once/flag.yml.
- Updated all include_tasks statements to use 'path_join' with playbook_dir,
  ensuring deterministic and absolute file resolution across roles.
- Fixed all network helper includes by converting direct relative paths such as
  'roles/docker-compose/tasks/utils/network.yml' to proper Jinja-evaluated paths.
- Normalized MATOMO_* variable names for consistency with the updated variable
  scope behavior in Ansible 2.20.
- Removed deprecated patterns that were implicitly supported in Ansible 2.18
  but break under the more strict variable and path resolution model in 2.20.

These changes are part of the full migration step required to ensure the
infinito-nexus roles remain stable, deterministic, and forward-compatible with
Ansible 2.20.

Details of the discussion and reasoning can be found in this conversation:
https://chatgpt.com/share/69300a8d-24d4-800f-bec0-e895a695618a
2025-12-03 11:02:34 +01:00
629e6194f9 Optimized for 2.20 2025-12-03 00:32:49 +01:00
94f97ed1f3 Refactor: Migrate deprecated Ansible facts to ansible_facts[] syntax
Why:
- Ansible 2.20+ deprecates INJECT_FACTS_AS_VARS and direct usage of top-level ansible_* facts.
- This change updates all affected roles and vars files to the new supported syntax.
- Ensures compatibility with upcoming Ansible 2.24 removal of implicit fact injection.

Conversation reference:
https://chatgpt.com/share/692f639b-1380-800f-9f18-732f7108e9e2
2025-12-02 23:09:46 +01:00
de121338cf Fix MSMTP Mailu routine loading condition
- Correct grouping of reachability check
- Replace incorrect boolean cast for mailu_token with length check
- Load Mailu routines only when host is unreachable or token is missing

Details: https://chatgpt.com/share/692f1e58-0d6c-800f-9699-e9a26f1e8db9
2025-12-02 18:14:16 +01:00
48cd7743b5 Refactor reachability checks for Matomo and Mailu
- Replace status_code [200,301,302] with explicit 'status_code: 200'
- Use '(status | default(0) | int) != 200' for consistent reachability detection
- Remove deprecated Jinja usage inside when-conditions
- Replace string-rendered conditions with native boolean checks
- Improve Mailu routine trigger logic by tightening status evaluation
- Cleanup unused no_log directives

Reference: https://chatgpt.com/share/692f04b5-5698-800f-a355-9e9b70cf97d7
2025-12-02 16:25:21 +01:00
4b5ba892ba Introduced SSL_ENABLED flag 2025-12-02 13:51:22 +01:00
d0d24547c2 Activated blob: for mastodon 2025-12-02 13:17:12 +01:00
fe496d4800 Deactivated CSS for ESPOCRM by Default 2025-12-02 12:10:15 +01:00
4ee208ffff Merge branch 'master' of github.com:kevinveenbirkenbach/infinito-nexus 2025-12-02 12:00:03 +01:00
0756e9d06e Optimized database variables 2025-12-02 11:59:55 +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
13b10ff85b Refactor docker-compose/core and Discourse reset logic
- Move docker-container role loading after directory creation in docker-compose/01_core.yml
- Extend allowed non-fatal errors for docker network disconnect (network missing, container missing, not found)
- Extend allowed non-fatal errors for ./launcher destroy (missing script, missing directory, not found)

Details: https://chatgpt.com/share/692ea63e-7738-800f-bdf1-011e96dc28e5
2025-12-02 09:41:49 +01:00