From 78e9dbc45273c1c810a004d8e0d48806a30f3b93 Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Fri, 25 Aug 2023 20:06:04 +0200 Subject: [PATCH] ci: upgrade pre-commit and init ansible-lint config Signed-off-by: Matej Focko --- .ansible-lint | 10 ++++++++++ .pre-commit-config.yaml | 7 ++++--- 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 .ansible-lint diff --git a/.ansible-lint b/.ansible-lint new file mode 100644 index 0000000..3930362 --- /dev/null +++ b/.ansible-lint @@ -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 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 85a1ac7..42199b6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,12 +8,13 @@ repos: - id: end-of-file-fixer - id: check-yaml - id: check-added-large-files - - repo: https://github.com/prettier/pre-commit - rev: 57f39166b5a5a504d6808b87ab98d41ebf095b46 + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v3.0.1 hooks: - id: prettier - repo: https://github.com/ansible/ansible-lint.git - rev: v6.4.0 + rev: v6.18.0 hooks: - id: ansible-lint files: \.(yaml|yml)$ + exclude: (templates|files).*$