ci: upgrade pre-commit and init ansible-lint config

Signed-off-by: Matej Focko <mfocko@redhat.com>
This commit is contained in:
Matej Focko 2023-08-25 20:06:04 +02:00
parent 7478d76b5e
commit 78e9dbc452
Signed by: mfocko
GPG key ID: 7C47D46246790496
2 changed files with 14 additions and 3 deletions

10
.ansible-lint Normal file
View file

@ -0,0 +1,10 @@
# https://ansible-lint.readthedocs.io/en/latest/configuring.html
skip_list:
- yaml # clashes with prettier
- package-latest # I DO WANT TO UPGRADE PACKAGES!!!
warn_list:
- command-instead-of-module # sometimes this is desired
- fqcn[action] # htpasswd -> community.general.web_infrastructure.htpasswd
- args[module] # false positive: Unsupported parameters for k8s module

View file

@ -8,12 +8,13 @@ repos:
- id: end-of-file-fixer - id: end-of-file-fixer
- id: check-yaml - id: check-yaml
- id: check-added-large-files - id: check-added-large-files
- repo: https://github.com/prettier/pre-commit - repo: https://github.com/pre-commit/mirrors-prettier
rev: 57f39166b5a5a504d6808b87ab98d41ebf095b46 rev: v3.0.1
hooks: hooks:
- id: prettier - id: prettier
- repo: https://github.com/ansible/ansible-lint.git - repo: https://github.com/ansible/ansible-lint.git
rev: v6.4.0 rev: v6.18.0
hooks: hooks:
- id: ansible-lint - id: ansible-lint
files: \.(yaml|yml)$ files: \.(yaml|yml)$
exclude: (templates|files).*$