forked from cehbrecht/ansible-nginx-playbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
29 lines (24 loc) · 962 Bytes
/
Makefile
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
28
29
.DEFAULT_GOAL := all
.PHONY: all
all: help
.PHONY: help
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " help to print this help message. (Default)"
@echo " roles to install roles from ansible-galaxy."
@echo " play to run ansible playbook."
@echo " clean to remove *all* files that are not controlled by 'git'. WARNING: use it *only* if you know what you do!"
.PHONY: roles
roles:
@echo "Installing required Ansible roles and collections from ansible-galaxy ..."
ansible-galaxy install -r requirements.yml
ansible-galaxy collection install -r requirements.yml
.PHONY: play
play: roles
echo "Installing Nginx with Ansible [all tasks] ..."
ansible-playbook -c local -i hosts playbook.yml
.PHONY: clean
clean:
@echo "Cleaning ..."
@git diff --quiet HEAD || echo "There are uncommited changes! Not doing 'git clean' ..."
@-git clean -dfx -e *.bak -e custom.yml -e etc/custom*.yml -e .vagrant