From 39476da79ef7d2a6599ec53851bada3e17068a29 Mon Sep 17 00:00:00 2001 From: histalek Date: Tue, 1 Jun 2021 10:25:54 +0200 Subject: [PATCH] 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/ --- .editorconfig | 3 +++ Makefile | 12 ++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 Makefile diff --git a/.editorconfig b/.editorconfig index aa9c364..ed64548 100644 --- a/.editorconfig +++ b/.editorconfig @@ -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 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..5d549f3 --- /dev/null +++ b/Makefile @@ -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