-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (24 loc) · 751 Bytes
/
Copy pathMakefile
File metadata and controls
29 lines (24 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
help:
@echo
@echo 'Available commands:'
@echo ' make deps - Install the tool dependencies.'
@echo ' make fmt - Apply automatic code formatting.'
@echo ' make lint - Lint YAML and Ansible files.'
@echo ' make configs - Run playbook after linting.'
@echo
.PHONY: help
deps:
pip3 install -q -r requirements.txt
.PHONY: deps
fmt: deps
# It returns exit code 8 if it modified any files.
# We handle this by ignoring any exit codes...
ansible-lint -q -c .github/linters/.ansible-lint.yml --fix=all || true
.PHONY: fmt
lint: deps
yamllint --no-warnings -d .github/linters/.yaml-lint.yml .
ansible-lint -q -c .github/linters/.ansible-lint.yml
.PHONY: lint
configs: deps lint
time ansible-playbook play.yml
.PHONY: configs