Commit Graph

3059 Commits

Author SHA1 Message Date
fc0bdbea9a Implemented SSL_ENABLED 2025-12-04 10:48:45 +01:00
a731b5cd4b Optimized test and added more output 2025-12-04 10:36:15 +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
657d4a064d Set localhost as default for DNS_PROVIDER, HOSTING_PROVIDER 2025-12-04 10:32:41 +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
bb4391d083 Fix Docker-in-Docker cgroup isolation issues by adding --cgroupns=host
The GitHub Actions DinD environment failed to start inner containers due to
cgroup v2 namespace isolation problems ('cannot enter cgroupv2 ... invalid state').
To resolve this, all docker run calls inside the CI workflow were updated
to include --cgroupns=host, ensuring the inner dockerd inherits the host
cgroup namespace instead of being sandboxed.

This aligns the CI runtime with the expectations of runc and prevents OCI-level
container creation failures.

Details and troubleshooting steps documented here:
https://chatgpt.com/share/6930e285-9604-800f-aad8-7a81c928548c
2025-12-04 02:41:20 +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
9182d14175 Ignored LID Switch Driver 2025-12-03 19:43:29 +01:00
b914fb9789 Refactor CLI filters: rename --ignore to --exclude and update all related logic and tests
- Updated CLI argument parsing to use --exclude instead of --ignore.
- Adjusted help texts, comments, and error messages accordingly.
- Updated role filtering logic and references (include → exclude).
- Added new unit tests for parse_roles_list(), filter_inventory_by_include(), and filter_inventory_by_ignore().
- Improved wording and consistency in docstrings.

This change is part of the refactoring required for the Ansible 2.18 → 2.20 upgrade, ensuring naming clarity and avoiding confusion with Python's 'ignore' semantics.

Conversation reference: https://chatgpt.com/share/69307ef2-1fb4-800f-a2ec-d56020019269
2025-12-03 19:18:39 +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
9ecfd8a762 Added shallow to Dockerfile 2025-12-03 18:01:08 +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
3e02fc0190 Added Exception 2025-12-03 13:27:05 +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
a31ef07718 Refactor CI workflows and fix timezone handling in containers
- Renamed test-cli.yml to test-code.yml and updated job name.
- Extended timeout for test-deploy workflow from 30 to 240 minutes.
- Skipped Ansible timezone configuration inside Docker/Podman/containerd to avoid write errors in CI.
- Added --skip-tests to the initial deploy step for improved CI stability.

Origin: https://chatgpt.com/share/69301c58-6628-800f-9e3a-f026c01b6e17
2025-12-03 12:17:59 +01:00
d12f7a10a6 Add optional --become-password support with automatic Vault encryption
- Implement ensure_become_password() to handle explicit, generated, and existing become passwords
- Integrate VaultHandler for encrypted ansible_become_password storage
- Add CLI parameter --become-password to inventory creation workflow
- Ensure backwards compatibility: existing passwords remain untouched unless explicitly overridden
- Add unit test verifying non-overwrite behaviour when no password is provided
- Part of migration and refactoring for Ansible 2.20 upgrade

Reference: https://chatgpt.com/share/69301a6d-e920-800f-b19c-e5ca7c3bdd24
2025-12-03 12:09:47 +01:00
e22893bdcb Optimized test_deploy.sh for the new stream 2025-12-03 11:12:32 +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
a6ed047765 CLI: Fix playbook output freeze by removing capture_output
The deploy wrapper previously used subprocess.run(..., capture_output=True),
which buffered all Ansible output until the playbook finished.
This made the CLI appear stuck at 'Launching Ansible Playbook…'.

Switching to subprocess.run(cmd) restores live streaming of Ansible output.

Details: https://chatgpt.com/share/693008b4-b7b0-800f-bd35-5a307a76fc59
2025-12-03 10:54:31 +01:00
629e6194f9 Optimized for 2.20 2025-12-03 00:32:49 +01:00
e9b0760d08 Added localhost variable 2025-12-03 00:31:56 +01:00
1cee61d00c Removed no-cache to raise performance 2025-12-03 00:30:53 +01:00
f06460db16 Fix: Automatically set ansible_connection=local for localhost in inventory generator
Adds automatic local Ansible connection settings and new unit test for localhost.
Details: https://chatgpt.com/share/692f7649-d35c-800f-948f-19d45cb93512
2025-12-03 00:29:29 +01:00
cde3991c95 Solved undefined variable bug 2025-12-02 23:37:01 +01:00
1eaeae2187 Add handler whitelist support to no-skipped-handlers integration test
This change introduces a WHITELISTED_HANDLERS mechanism, allowing specific
handlers to be intentionally skipped due to conditional 'False' evaluations
without causing test failures. Improves flexibility while keeping the
architectural policy enforced for all other handlers.

Reference: https://chatgpt.com/share/692f6841-c19c-800f-8d6c-aa1ef48dcf7e
2025-12-02 23:29:36 +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
46174125bc Refine deploy CLI, test-deploy workflow and Ansible output
Changes:
- Update GitHub Actions test-deploy workflow to run three staged deploys (normal+debug, reset+debug, async) using inventory-generated vault password files.
- Switch Ansible stdout_callback to ansible.builtin.default and enable YAML-style result_format via callback_default.
- Refactor cli/deploy.py: typed run_ansible_playbook(), structured MODE_* handling, better error reporting, and preserved vault/interactive behaviour.
- Add unit tests for deploy CLI (bool parsing, MODE_* loading, dynamic args, validation, and ansible-playbook command construction) under tests/unit/cli/test_deploy.py.

Context: see ChatGPT conversation on 2025-12-02: https://chatgpt.com/share/692f1035-6bc4-800f-91a9-342db54e1a75
2025-12-02 20:25:26 +01:00
8a453be4b9 Removed unnecessary warning 2025-12-02 19:36:01 +01:00
f21bf5d459 Improve test-deploy workflow:
- Switch to Python-based vault password generation
- Export VAULT_PASSWORD for internal container usage
- Add first deploy with --debug
- Add second deploy with --reset --debug
- Add third async deploy (no debug)
- Remove incorrect volume copy step and create vault file inside container
Conversation reference: https://chatgpt.com/share/692f1035-6bc4-800f-91a9-342db54e1a75
2025-12-02 19:33:07 +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
20ecb62afe CI: Improve Docker reliability for pacman by enforcing host networking
This change updates test-cli.yml to use --network=host for docker build
and docker run steps. This significantly reduces intermittent Arch mirror
timeouts observed in local and CI environments.

Reference:
https://chatgpt.com/share/692f1bd7-f144-800f-b2ac-900d78a69e9d
2025-12-02 18:03:36 +01:00
63f6723106 Added GitHub Workflow Draft: Test deploy; Version 2 - https://chatgpt.com/share/692f1035-6bc4-800f-91a9-342db54e1a75 2025-12-02 17:33:24 +01:00