Adding pre-commit hooks for ansible linting
This commit is contained in:
6
.gitignore
vendored
6
.gitignore
vendored
@@ -24,3 +24,9 @@ infra/**/tfplan
|
||||
.ansible/
|
||||
|
||||
wiki-resources/public_infrastructure.png
|
||||
|
||||
bin/
|
||||
lib/
|
||||
lib64
|
||||
pyvenv.cfg
|
||||
share/
|
||||
|
||||
21
.pre-commit-config.yaml
Normal file
21
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
repos:
|
||||
- repo: https://github.com/ansible/ansible-lint
|
||||
rev: v26.4.0
|
||||
hooks:
|
||||
- id: ansible-lint
|
||||
name: ansible-lint
|
||||
description: Run ansible-lint on playbooks
|
||||
entry: ansible-lint
|
||||
args:
|
||||
- ansible
|
||||
language: python
|
||||
exclude: |
|
||||
(?x)(
|
||||
^deprecated/|
|
||||
^infra/|
|
||||
^runbooks/|
|
||||
^wiki-resources/|
|
||||
^\.pre-commit-config.yaml|
|
||||
^\.gitignore
|
||||
)
|
||||
Reference in New Issue
Block a user