G5: exclude .gitea/ from role lint; document baseline granularity

ansible-lint was flagging callers' workflow files (yaml[truthy] on `on:`),
which actionlint already checks. Exclude .gitea/ in the reusable workflow
and in the documented baseline command. Note that .ansible-lint-ignore is
per file and rule, not per line.

Refs DevOps/software-infrastructure#53

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 18:24:29 -05:00
co-authored by Claude Opus 5.5
parent 84dbed9d8c
commit 8efe539bf1
2 changed files with 11 additions and 2 deletions
+9 -1
View File
@@ -71,13 +71,21 @@ docker run --rm -v "$PWD:/src" -w /tmp gitea.eom.dev/devops/ci-tools:1.0.0 bash
mkdir -p /tmp/roles && cp -a /src /tmp/roles/ericomeehan.NAME &&
ln -s /tmp/roles/ericomeehan.NAME /tmp/roles/ansible-role-NAME &&
cd /tmp/roles/ericomeehan.NAME &&
ANSIBLE_ROLES_PATH=/tmp/roles ansible-lint --warn-list role-name --generate-ignore;
ANSIBLE_ROLES_PATH=/tmp/roles ansible-lint --warn-list role-name --exclude .gitea --generate-ignore;
cp .ansible-lint-ignore /src/'
```
Replace `NAME`. Baselined findings still print, as warnings. Fixing them later
means deleting lines from `.ansible-lint-ignore`.
The baseline is per file and rule, not per line. A new finding of a rule that
is already baselined in the same file (say a second `name[casing]` in
`tasks/main.yml`) only warns. New rules, and any finding in a new file, fail.
Shrink the baseline as files are cleaned up, so it covers less over time.
`.gitea/` is excluded: workflow files are checked by actionlint, not
ansible-lint.
### Helm chart
```yaml