Switch to upstream ansible-lint pre-commit hook

This way, the hook is self contained and does not depend on a previous
virtualenv installation.
lean/pre-commit-hook-2
Max Gautier 2024-05-21 20:57:06 +02:00
parent 21aba10e08
commit f6d9ff4196
No known key found for this signature in database
1 changed files with 8 additions and 6 deletions

View File

@ -35,16 +35,18 @@ repos:
exclude: "^.git"
files: "\\.sh$"
- repo: local
- repo: https://github.com/ansible/ansible-lint
rev: v24.5.0
hooks:
- id: ansible-lint
name: ansible-lint
entry: ansible-lint -v
language: python
pass_filenames: false
additional_dependencies:
- .[community]
- ansible==9.5.1
- jsonschema==4.22.0
- jmespath==1.0.1
- netaddr==1.2.1
- repo: local
hooks:
- id: ansible-syntax-check
name: ansible-syntax-check
entry: env ANSIBLE_INVENTORY=inventory/local-tests.cfg ANSIBLE_REMOTE_USER=root ANSIBLE_BECOME="true" ANSIBLE_BECOME_USER=root ANSIBLE_VERBOSITY="3" ansible-playbook --syntax-check