From a5310b0a855d1119353fa195b82cca1fadafdb27 Mon Sep 17 00:00:00 2001 From: Rafael Guterres Jeffman <rjeffman@redhat.com> Date: Mon, 27 Sep 2021 18:42:51 -0300 Subject: [PATCH] pre-commit: Exclude env_*.yml files from ansible-lint. As of September, 2021, Ansible-lint cannot evaluate task files which included through `include_tasks`, as it fails syntax-check. This change exclude evaluation of these files (`env_*`) when evaluating files before commit (pre-commit). --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e7ec5d06..51c3ca91 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,6 +7,7 @@ repos: always_run: false pass_filenames: true files: \.(yaml|yml)$ + exclude: /env[^/]*.(yaml|yml)$ entry: | env ANSIBLE_LIBRARY=./plugins/modules ANSIBLE_MODULE_UTILS=./plugins/module_utils ANSIBLE_DOC_FRAGMENT_PLUGINS=./plugins/doc_fragments ansible-lint - repo: https://github.com/adrienverge/yamllint.git -- GitLab