mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-09 04:06:42 +00:00
# Conflicts: # README.md # roles/svc-bkp-local-2-device/tasks/00_core.yml # roles/svc-bkp-nfs-2-local/tasks/00_core.yml # roles/svc-bkp-remote-2-local/tasks/00_core.yml # roles/svc-bkp-secrets-2-local/tasks/00_core.yml # roles/svc-bkp-volume-2-local/tasks/00_core.yml # roles/sys-ctl-cln-bkps/tasks/00_core.yml # roles/sys-ctl-cln-certs/tasks/00_core.yml # roles/sys-ctl-cln-disc-space/tasks/00_core.yml # roles/sys-ctl-cln-faild-bkps/tasks/00_core.yml # roles/sys-ctl-hlth-webserver/filter_plugins/web_health_expectations.py # roles/sys-ctl-mtn-cert-renew/tasks/00_core.yml # roles/sys-svc-container/README.md # roles/sys-svc-container/vars/main.yml # roles/sys-svc-proxy/templates/headers/forwarded.conf.j2 # roles/sys-svc-webserver-https/tasks/00_core.yml # roles/sys-token-store/tasks/write.yml # roles/web-app-discourse/templates/config.yml.j2 # roles/web-app-keycloak/files/shell/per_app_mapper/ensure_app_group.sh # roles/web-app-keycloak/files/shell/per_app_mapper/purge/app_subgroups.sh # roles/web-app-keycloak/files/shell/per_app_mapper/sync_app_mapper.sh # roles/web-app-keycloak/files/shell/per_app_mapper/upsert_app_mapper.sh # roles/web-app-matomo/tasks/03_install_path.yml # roles/web-app-matomo/tasks/08_reinject_consumers.yml # roles/web-app-matrix/README.md # roles/web-app-matrix/tasks/flavor/compose/04_webserver.yml # roles/web-app-matrix/vars/main.yml # roles/web-app-moodle/tasks/03_ownership.yml # roles/web-app-seaweedfs/meta/info.yml # roles/web-app-stalwart/tasks/04_manage_user.yml # roles/web-opt-rdr-domains/README.md # roles/web-opt-rdr-domains/tasks/main.yml # roles/web-svc-file/tasks/00_core.yml # roles/web-svc-html/tasks/00_core.yml # tests/unit/python/roles/web-app-prometheus/test_blackbox_targets.py
utils/install
This directory hosts the Python implementation behind make install-lint.
For the general rules that govern READMEs in code directories see documentation.md.
Purpose
The package installs the lint toolchain (actionlint, shfmt, ruff, ansible-lint, mbake, markdownlint-cli2, eslint, shellcheck, ansible-playbook, ansible-galaxy) using the right channel per tool (system package manager, pip, npm, or GitHub release). Modules at this level are channel-agnostic primitives; per-tool policy lives one level down in lint/.
Structure
| File | Role |
|---|---|
primitives.py |
Logging, sudo wrapping, PATH mutation, and stdlib-based URL download. |
pip.py |
Venv-aware pip installer with --break-system-packages and --user fallback. |
npm.py |
Global / local npm install with per-user --prefix fallback. |
node.py |
Node.js runtime that is still supported upstream: the distro package, or the newest LTS from nodejs.org (signature- and checksum-verified) when the distro line has reached its end of life. |
github_release.py |
Latest-tag resolver and asset downloader for GitHub releases. |
system_pkg.py |
Per-manager dispatch for pacman / apt-get / dnf / yum / brew. |
lint/ |
One module per tool, each exposing ensure(). See lint README. |
The CLI entry point lives at __main__.py, invoked from lint.sh as python3 -m utils.install.lint.
The matching dispatcher wrapper.sh routes make install-lint host vs container based on INFINITO_LINT_RUNNER.
File Naming
- Module names MUST stay lowercase snake_case.
- Channel-agnostic helpers MUST live directly under
utils/install/. - Per-tool policy (one tool per file) MUST live under
lint/(see lint README). - Test files live in
tests/unit/python/utils/install/and mirror the module name with atest_prefix.
Import Rules
primitives.pyMUST NOT import from any other module in this package.pip.py,npm.py,github_release.py, andsystem_pkg.pyMAY import fromprimitives.py.npm.pyMAY import fromsystem_pkg.pyandnode.pyto bootstrap npm itself; no other cross-imports between these four are allowed.node.pyMAY import fromprimitives.pyandsystem_pkg.py.- Per-tool modules under
lint/MUST NOT import each other (see lint README).