summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Fennell <matthew@fennell.dev>2024-01-07 13:10:12 +0000
committerMatthew Fennell <matthew@fennell.dev>2024-01-07 13:10:12 +0000
commit7a75827b7c6cef7dfbb7bf9025561051eacc50b0 (patch)
tree0159ade7ea93f67c028e20e106cc6b3d2e14c994
parentb718d05747d8f32bb5d427ccf23f84c70b288230 (diff)
Replace yamllint with ansible-lint
ansible-lint uses yamllint under the hood, and also checks for many more "logical" errors in the ansible config.
-rw-r--r--.precious.toml15
-rw-r--r--README.md2
2 files changed, 9 insertions, 8 deletions
diff --git a/.precious.toml b/.precious.toml
index 89e21de..9727732 100644
--- a/.precious.toml
+++ b/.precious.toml
@@ -2,6 +2,14 @@
#
# SPDX-License-Identifier: AGPL-3.0-only
+[commands.ansiblelint]
+cmd = ["ansible-lint", "-q"]
+include = "*"
+invoke = "once"
+ok_exit_codes = [0]
+path_args = "none"
+type = "lint"
+
[commands.gitlint]
cmd = ["gitlint"]
include = "*"
@@ -25,10 +33,3 @@ include = ["hooks/*"]
lint_failure_exit_codes = [1]
ok_exit_codes = [0]
type = "lint"
-
-[commands.yamllint]
-cmd = ["yamllint", "--strict"]
-include = ["*.yaml"]
-lint_failure_exit_codes = [1, 2]
-ok_exit_codes = [0]
-type = "lint"
diff --git a/README.md b/README.md
index c921dde..11812f0 100644
--- a/README.md
+++ b/README.md
@@ -79,11 +79,11 @@ make prod
We provide sample git hooks in the `hooks` directory. To use these, ensure the
following packages are installed:
+* ansible-lint
* gitlint
* precious
* reuse
* shellcheck
-* yamllint
```shell
$ git config core.hooksPath hooks