From 197921ddeaee286617b569dbcd85305195e910c8 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 09:16:48 -0500 Subject: [PATCH] CI: ansible-lint via the shared reusable workflow Adds .gitea/workflows/lint.yaml calling DevOps/software-infrastructure's reusable-ansible-role-lint.yaml, and a baseline (.ansible-lint-ignore, 12 file/rule entries) of existing findings so only new problems fail. Manual-only until the shared runner is proven stable (#41) and the CI tools image is published (#49). CI files only; nothing the role deploys changes. Refs DevOps/software-infrastructure#53 Co-Authored-By: Claude Opus 5.5 --- .ansible-lint-ignore | 13 +++++++++++++ .gitea/workflows/lint.yaml | 27 +++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .ansible-lint-ignore create mode 100644 .gitea/workflows/lint.yaml diff --git a/.ansible-lint-ignore b/.ansible-lint-ignore new file mode 100644 index 0000000..84826d6 --- /dev/null +++ b/.ansible-lint-ignore @@ -0,0 +1,13 @@ +# This file contains ignores rule violations for ansible-lint +defaults/main.yml yaml[comments] +files/alerting-rules.yml yaml[line-length] +handlers/main.yml yaml[comments] +meta/main.yml meta-incorrect +meta/main.yml schema[meta] +meta/main.yml yaml[comments] +tasks/main.yml yaml[comments] +tasks/main.yml yaml[indentation] +tasks/main.yml yaml[trailing-spaces] +tests/test.yml name[play] +tests/test.yml yaml[comments] +vars/main.yml yaml[comments] diff --git a/.gitea/workflows/lint.yaml b/.gitea/workflows/lint.yaml new file mode 100644 index 0000000..ce988bf --- /dev/null +++ b/.gitea/workflows/lint.yaml @@ -0,0 +1,27 @@ +# ansible-lint for this role. DevOps/software-infrastructure#53 (G5). +# Uses the shared reusable workflow; see docs/ci-cd/adding-ci.md in +# DevOps/software-infrastructure. Known findings are baselined in +# .ansible-lint-ignore, so only new problems fail. +# +# Manual-only until the shared runner is proven stable (#41) and the CI +# tools image is published (#49). Then replace `on:` with: +# +# on: +# push: +# branches: [main] +# pull_request: +name: lint + +on: + workflow_dispatch: + +concurrency: + group: lint-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + ansible: + uses: DevOps/software-infrastructure/.gitea/workflows/reusable-ansible-role-lint.yaml@main