From 3a5cf551e72088775affe7a3f009be761b234e50 Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Sun, 24 Oct 2021 14:23:30 +0200 Subject: [PATCH] makefile: Group targets with different headlines --- makefile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/makefile b/makefile index 24a1ec7..f1ded72 100644 --- a/makefile +++ b/makefile @@ -3,21 +3,29 @@ playbooks_dir:=playbooks playbooks:=$(wildcard ${playbooks_dir}/*.yml) credentials_dir:=credentials +# Default Target (must be first target) + .PHONY: main main: ansible-playbook site.yml +# Playbook Execution + .PHONY: list list: @echo ${playbooks} +.PHONY: ${playbooks} +${playbooks}: + ansible-playbook ${playbooks_dir}/$@.yml + +# Vault Handling + .PHONY: vault vault: ansible-vault edit ${vault} -.PHONY: ${playbooks} -${playbooks}: - ansible-playbook ${playbooks_dir}/$@.yml +# Credential Handling .PHONY: store-credentials store-credentials: credentials.tar.gpg