feat: add linter and ci configs

This commit is contained in:
Simon Cornet 2026-04-21 17:25:46 +02:00
commit 8eb19c67e8
4 changed files with 78 additions and 0 deletions

23
.ansible-lint Normal file
View file

@ -0,0 +1,23 @@
---
exclude_paths:
- ".gitlab/*"
- ".gitlab-ci.yml"
- "defaults/main.yaml"
- "meta/main.yaml"
- "vars/*"
kinds:
- playbook: "**/*.{yml,yaml}"
skip_list:
- "command-shell"
- "experimental"
- "git-latest"
- "no-changed-when"
- "no-handler"
- "name[casing]"
- "name[template]"
- "risky-file-permissions"
- "schema[playbook]"
- "var-naming[no-role-prefix]"

13
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,13 @@
---
# gitlab stages
stages:
- "gitleaks"
- "linting"
# include components
include:
- component: "$CI_SERVER_FQDN/components/ansible/linting@v3.0.3"
- component: "$CI_SERVER_FQDN/components/gitleaks/gitleaks@v1.0.0"
- component: "$CI_SERVER_FQDN/components/markdownlint/markdownlint@1.0.0"
- component: "$CI_SERVER_FQDN/components/yamllint/yamllint@1.0.2"

12
.markdownlint-cli2.jsonc Normal file
View file

@ -0,0 +1,12 @@
{
// files to lint
"globs": [
"readme.md"
],
// linting rules
"config": {
"MD013": {
"line_length": 120
}
}
}

30
.yamllint Normal file
View file

@ -0,0 +1,30 @@
---
extends: 'default'
rules:
braces:
max-spaces-inside: 1
forbid: true
comments:
min-spaces-from-content: 1
comments-indentation: false
empty-lines:
max: 2
indentation:
spaces: 2
check-multi-line-strings: true
line-length:
max: 120
allow-non-breakable-words: true
allow-non-breakable-inline-mappings: true
new-line-at-end-of-file: 'enable'
octal-values:
forbid-implicit-octal: true
forbid-explicit-octal: true
truthy:
allowed-values:
- 'true'
- 'false'
quoted-strings:
quote-type: 'any'
required: true