Add the lint configuration and the Makefile
ansible-lint at the production profile from the first commit, which is much cheaper than adopting it later. yamllint forbids implicit octal so a file mode cannot silently become an integer, and the Makefile is a thin wrapper so `make check` and CI run byte-identical commands. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5
parent
ff0a518001
commit
9b9e39e67f
@@ -0,0 +1,22 @@
|
||||
# Thin wrapper over scripts/, so that `make check` and CI run byte-identical
|
||||
# commands. See CONTRIBUTING.md.
|
||||
.PHONY: help check install lint syntax
|
||||
|
||||
help:
|
||||
@echo "make check - the full static gate (what CI runs)"
|
||||
@echo "make install - install the Galaxy collections"
|
||||
@echo "make lint - yamllint + ansible-lint only"
|
||||
@echo "make syntax - syntax-check every playbook only"
|
||||
|
||||
check:
|
||||
scripts/check.sh
|
||||
|
||||
install:
|
||||
cd ansible && ansible-galaxy install -r requirements.yml
|
||||
|
||||
lint:
|
||||
yamllint .
|
||||
cd ansible && ansible-lint .
|
||||
|
||||
syntax:
|
||||
cd ansible && for p in playbooks/*.yml; do ansible-playbook --syntax-check "$$p"; done
|
||||
Reference in New Issue
Block a user