makefile: Split up phony entries

master
Felix Stupp 3 years ago
parent 734091b4fb
commit 8e6a96c5fa
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -3,24 +3,28 @@ playbooks_dir:=playbooks
playbooks:=$(wildcard ${playbooks_dir}/*.yml)
credentials_dir:=credentials
.PHONY: main list vault ${playbooks} store-credentials load-credentials
.PHONY: main
main:
ansible-playbook site.yml
.PHONY: list
list:
@echo ${playbooks}
.PHONY: vault
vault:
ansible-vault edit ${vault}
.PHONY: ${playbooks}
${playbooks}:
ansible-playbook ${playbooks_dir}/$@.yml
.PHONY: store-credentials
store-credentials: credentials.tar.gpg
credentials.tar.gpg: $(shell find "${credentials_dir}")
tar -cf - "${credentials_dir}" | gpg --encrypt --recipient 73D09948B2392D688A45DC8393E1BD26F6B02FB7 > "$@"
.PHONY: load-credentials
load-credentials:
< credentials.tar.gpg gpg --decrypt | tar -xf -

Loading…
Cancel
Save