|
|
|
@ -1,8 +1,9 @@
|
|
|
|
|
vault:=group_vars/all/vault.yml
|
|
|
|
|
playbooks_dir:=playbooks
|
|
|
|
|
playbooks:=$(wildcard ${playbooks_dir}/*.yml)
|
|
|
|
|
credentials_dir:=credentials
|
|
|
|
|
|
|
|
|
|
.PHONY: main list vault ${playbooks}
|
|
|
|
|
.PHONY: main list vault ${playbooks} store-credentials load-credentials
|
|
|
|
|
|
|
|
|
|
main:
|
|
|
|
|
ansible-playbook site.yml
|
|
|
|
@ -15,3 +16,11 @@ vault:
|
|
|
|
|
|
|
|
|
|
${playbooks}:
|
|
|
|
|
ansible-playbook ${playbooks_dir}/$@.yml
|
|
|
|
|
|
|
|
|
|
store-credentials: credentials.tar.gpg
|
|
|
|
|
|
|
|
|
|
credentials.tar.gpg: $(shell find "${credentials_dir}" -type f)
|
|
|
|
|
tar -cf - "${credentials_dir}" | gpg --encrypt --recipient 73D09948B2392D688A45DC8393E1BD26F6B02FB7 > "$@"
|
|
|
|
|
|
|
|
|
|
load-credentials:
|
|
|
|
|
< credentials.tar.gpg gpg --decrypt | tar -xf -
|
|
|
|
|