Files
computer-playbook/.ansible-lint
kevinveenbirkenbachandClaude Opus 4.8 1a908a6e5b perf(tests): parallelize suites, hoist fixtures, gate ansible-lint
Run the python suites through pytest-xdist when pytest is importable
(id-level collection parity with unittest discover verified per suite;
serial unittest stays the fallback), with -rP so warnings printed by
passing tests, like the update annotations, still reach the log. run.sh
self-provisions the dev extras through scripts/install/dev-extras.sh,
which stamps inside the venv and skips read-only venvs; make onboard
pre-warms the same path in the running container.

Hoist per-test cache resets and roles scans to setUpClass in the lookup
and resolvable suites (a per-test fingerprint-memo reset closes an
id()-reuse cache-poisoning flake the hoist exposed), inject generation
names into the nfs backup script test instead of sleeping, and narrow
ansible-lint scope to real ansible content. ansible-lint additionally
sits behind a content fingerprint gate that skips the run when nothing
it walks has changed; without a usable git (container bind mounts) the
gate disables itself and the full run remains.

Drop the import-linter layer and ignore for the deleted deps module;
the contract now locks compose -> common -> env. Measured on the host:
unit 101s to 20s, integration 90s to 24s, lint tests 43s to 19s,
repeated ansible-lint 53s to 0.4s.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-10 21:20:46 +02:00

40 lines
1.1 KiB
Plaintext

---
# ansible-lint config — see https://ansible.readthedocs.io/projects/lint/configuring/
# Strategy: start with the `min` profile so the baseline is achievable today;
# graduate to `basic` / `moderate` once the existing tree is clean.
profile: min
# Per-file false-positive ignores live in `.ansible-lint-ignore`
# (load-failure / syntax-check are tagged `unskippable` and cannot go in
# skip_list).
# Paths that ansible-lint should not walk.
exclude_paths:
- .cache/
- .claude/
- .github/
- /cli/
- compose/
- /docs/
- /tests/
- /utils/
- venv/
- .venv/
- build/
# Files that are not Ansible content but live under the same tree as roles
# and would otherwise be misclassified.
kinds:
- playbook: "playbook.yml"
- tasks: "roles/*/tasks/*.yml"
- tasks: "tasks/**/*.yml"
- vars: "roles/*/vars/*.yml"
- vars: "roles/*/meta/addons/*.yml"
- vars: "group_vars/**/*.yml"
- vars: "host_vars/**/*.yml"
- meta: "roles/*/meta/main.yml"
- meta-runtime: "roles/*/meta/runtime.yml"
- handlers: "roles/*/handlers/*.yml"
- defaults: "roles/*/defaults/*.yml"