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).
This commit is contained in:
Rafael Guterres Jeffman
2021-09-27 18:42:51 -03:00
parent 279ac60ac1
commit a5310b0a85

View File

@@ -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