From 4b7e3bd74b7b271e3ad1d17a34b0773fe81be7e5 Mon Sep 17 00:00:00 2001 From: Jose Date: Wed, 24 Dec 2025 07:34:00 +0100 Subject: [PATCH] =?UTF-8?q?chore=20=F0=9F=93=A6:=20Add=20.ansible-lint=20c?= =?UTF-8?q?onfig=20to=20exclude=20paths=20and=20enable=20rules?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds a new `.ansible-lint` configuration file to specify which paths to exclude from linting and enables specific rules for better code quality. --- .ansible-lint | 31 +++++++++++++++++++++++++++++++ .gitea/workflows/ansible-lint.yml | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 .ansible-lint diff --git a/.ansible-lint b/.ansible-lint new file mode 100644 index 0000000..5b52ff6 --- /dev/null +++ b/.ansible-lint @@ -0,0 +1,31 @@ +--- + +# .ansible-lint + +exclude_paths: + - .gitea + +# Ansible-lint does not automatically load rules that have the 'opt-in' tag. + +# You must enable opt-in rules by listing each rule 'id' below. + +enable_list: + - args + - empty-string-compare # opt-in + - no-log-password # opt-in + - no-same-owner # opt-in + - name[prefix] # opt-in + - galaxy-version-incorrect # opt-in +# add yaml here if you want to avoid ignoring yaml checks when yamllint +# library is missing. Normally its absence just skips using that rule. + - yaml +# List of additional kind:pattern to be added at the top of the default +# match list, first match determines the file kind. +kinds: + - playbook: "**/playbooks/*.{yml,yaml}" + - roles: "**/roles/*.{yml,yaml}" + # - galaxy: "**/folder/galaxy.yml" + - tasks: "**/tasks/*.yml" + - vars: "**/*vars/*.yml" + - meta: "**/meta/main.yml" + - yaml: "**/*.yaml-too" diff --git a/.gitea/workflows/ansible-lint.yml b/.gitea/workflows/ansible-lint.yml index d94cb89..d089d74 100644 --- a/.gitea/workflows/ansible-lint.yml +++ b/.gitea/workflows/ansible-lint.yml @@ -25,4 +25,4 @@ jobs: - name: Run ansible-lint run: | - ansible-lint \ No newline at end of file + ansible-lint