-
-
Save xirixiz/97ee0dd4d362189f23434f869bd39542 to your computer and use it in GitHub Desktop.
Run Ansible Playbook in .makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I found at https://dreisbach.us/articles/simple-ansible-makefile/ | |
# Replace this | |
# ansible-playbook -i hosts --vault-password-file=.vault-password.txt site.yml | |
# For this | |
tags = $(subst roles/,,$(wildcard roles/*)) | |
.PHONY: all $(tags) | |
all: | |
ansible-playbook -i hosts --vault-password-file=.vault-password.txt site.yml | |
$(tags): | |
ansible-playbook -i hosts -t $@ --vault-password-file=.vault-password.txt site.yml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment