Add self-documenting Makefile
This Makefile is quite simple for now. But in the future i plan to create multiple ansible role skeletons and this Makefile can simplify the usage of these quite a bit. I learned about self-documenting Makefiles from Sheo's Blog [1] and the referenced article from Victoria Drake [2]. [1] https://shivering-isles.com/til/2021/05/self-documenting-makefiles [2] https://victoria.dev/blog/how-to-create-a-self-documenting-makefile/
This commit is contained in:
parent
6ab8adfd0a
commit
39476da79e
2 changed files with 15 additions and 0 deletions
|
@ -9,6 +9,9 @@ indent_style = space
|
|||
indent_size = 4
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[Makefile]
|
||||
indent_style = tab
|
||||
|
||||
[*.md]
|
||||
insert_final_newline = false
|
||||
trim_trailing_whitespace = false
|
||||
|
|
12
Makefile
Normal file
12
Makefile
Normal file
|
@ -0,0 +1,12 @@
|
|||
SHELL := /bin/bash
|
||||
.POSIX:
|
||||
.PHONY: help lint install
|
||||
|
||||
help: ## Show this help
|
||||
@egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
|
||||
|
||||
lint: ## Lint ansible files with ansible-lint
|
||||
ansible-lint
|
||||
|
||||
install: ## Install or update requirements
|
||||
ansible-galaxy install -f -r requirements.yml
|
Loading…
Add table
Reference in a new issue