diff --git a/.gitea/workflows/reusable-ansible-role-lint.yaml b/.gitea/workflows/reusable-ansible-role-lint.yaml index ce4124e..27fc980 100644 --- a/.gitea/workflows/reusable-ansible-role-lint.yaml +++ b/.gitea/workflows/reusable-ansible-role-lint.yaml @@ -58,9 +58,12 @@ jobs: mkdir -p "$roles/$name" cp -a . "$roles/$name/" # The galaxy skeleton's tests/test.yml names the role by its repo - # name, so make that resolve too (syntax-check can't be skipped). + # name (ansible-role-x) or its bare name (x), so make both resolve + # too (syntax-check can't be skipped or baselined). repo_name="${REPO##*/}" - if [ "$repo_name" != "$name" ]; then ln -sfn "$roles/$name" "$roles/$repo_name"; fi + for alias in "$repo_name" "${repo_name#ansible-role-}"; do + if [ "$alias" != "$name" ]; then ln -sfn "$roles/$name" "$roles/$alias"; fi + done export ANSIBLE_ROLES_PATH="$roles" cd "$roles/$name" echo "Linting role as ${name} with $(ansible-lint --version | head -1)" diff --git a/docs/ci-cd/adding-ci.md b/docs/ci-cd/adding-ci.md index 9f20ed4..43b19ef 100644 --- a/docs/ci-cd/adding-ci.md +++ b/docs/ci-cd/adding-ci.md @@ -70,6 +70,7 @@ and fail only on new problems, commit a baseline: docker run --rm -v "$PWD:/src" -w /tmp gitea.eom.dev/devops/ci-tools:1.0.0 bash -c ' mkdir -p /tmp/roles && cp -a /src /tmp/roles/ericomeehan.NAME && ln -s /tmp/roles/ericomeehan.NAME /tmp/roles/ansible-role-NAME && + ln -s /tmp/roles/ericomeehan.NAME /tmp/roles/NAME && cd /tmp/roles/ericomeehan.NAME && ANSIBLE_ROLES_PATH=/tmp/roles ansible-lint --warn-list role-name --exclude .gitea --generate-ignore; cp .ansible-lint-ignore /src/' @@ -166,6 +167,9 @@ a local build of the tools image (1.0.0), against: | ansible-role-lint | DevOps/ansible-role-gitea as it is | fails, 48 findings | | | the same with a generated baseline | passes | | | baseline plus a new `shell:` task | fails on the new task only | +| role lint (2026-11-16, G5 batch 2) | eom, discourse, mcp-servers, listmonk, prometheus with generated baselines, and gitea, www, dex again | all pass | +| | listmonk plus a new `tasks/extra.yml` with an unnamed `shell:` | fails on the new file | +| | eom with the previous step (no bare-name link) | fails: `tests/test.yml` names the role `eom` | | helm-lint | DevOps/helm-jamulus | passes | | | a template referencing a missing value | fails in `helm lint` | | | a Service with a string port | fails in kubeconform |