blob: 9a33226d64c6c7843310f5b4ddeb1b0d495322a1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# Ansible Makefile
#
# ~ rgoncalves.se
#
# Why:
# I don't want to always run `ansible-playbook playbooks/playbook-name.yml`,
# I am tired of it.
#
# Some inspiration that might made its way here -or will-:
# - https://github.com/paulRbr/ansible-makefile/blob/master/Makefile
# - https://dreisbach.us/articles/simple-ansible-makefile/
PLAYBOOK_DIR = playbooks
PLAYBOOKS != find $(PLAYBOOK_DIR) -iname "*.yml" | \
sed 's/^$(PLAYBOOK_DIR)\///g' | \
sed 's/.yml//g'
.PHONY: $(PLAYBOOKS)
_debug:
@echo "available tasks:"
@echo $(PLAYBOOKS) | \
tr " " "\n" | \
sed 's/^/- /g' | \
sort
$(PLAYBOOKS):
ansible-playbook $(PLAYBOOK_DIR)/$@.yml
|