From b7b08b33c4ad7b43e1a3c8d6555deaf398e1ed87 Mon Sep 17 00:00:00 2001 From: arhuman Date: Tue, 8 Sep 2026 17:48:30 +0530 Subject: [PATCH] Add astl for fast local Ansible static linting (#13472) --- .gitlab-ci/lint.yml | 1 + .pre-commit-config.yaml | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/.gitlab-ci/lint.yml b/.gitlab-ci/lint.yml index 809ad09ab..8783ad1de 100644 --- a/.gitlab-ci/lint.yml +++ b/.gitlab-ci/lint.yml @@ -9,6 +9,7 @@ pre-commit: ANSIBLE_STDOUT_CALLBACK: default script: - pre-commit run --all-files --show-diff-on-failure + - pre-commit run ansible-lint --hook-stage manual --all-files --show-diff-on-failure cache: key: pre-commit-2 paths: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 16d79bda9..93799ccc1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -28,10 +28,16 @@ repos: exclude: "^.git" files: "\\.sh$" + - repo: https://github.com/arhuman/ansible-static-lint + rev: v0.5.0 + hooks: + - id: astl + - repo: https://github.com/ansible/ansible-lint rev: v25.11.0 hooks: - id: ansible-lint + stages: [manual] additional_dependencies: - ansible-core>=2.18.0,<2.19.0 - jmespath==1.0.1