Development
Commands for working on this repo's own code, as opposed to deploying with it (see README.md for that).
Install dependencies
uv sync --all-extras --all-packages --no-progress
uv --offline run --no-sync --no-progress ansible-galaxy install -r requirements.yml
Git hook
The pre-commit hook runs gitleaks (must be installed and
on PATH) to scan for secrets. Enable it once per clone:
chmod +x ./.git-hooks/pre-commit
git config --local core.hooksPath .git-hooks
Syntax check
Validates the playbook without touching a host:
uv --offline run --no-sync --no-progress ansible-playbook playbook.yml --syntax-check
Lint
Mirrors the ansible-lint and yamllint jobs in .gitea/workflows/lint.yml:
uv --offline run --no-sync --no-progress ansible-lint
uv --offline run --no-sync --no-progress yamllint --strict ./
The same workflow also runs these Python and formatting checks:
uv --offline run --no-sync --no-progress mypy --verbose ./
uv --offline run --no-sync --no-progress pylint --verbose ./
uv --offline run --no-sync --no-progress isort --check-only --verbose ./
uv --offline run --no-sync --no-progress black --check --verbose ./
uv --offline run --no-sync --no-progress ruff check --verbose ./
uv --offline run --no-sync --no-progress pyright --verbose
prettier --check .