-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (44 loc) · 1.14 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
.DEFAULT_GOAL := default
MAKEFLAGS := "-s"
SHELL := /bin/bash
HOSTNAME := $(shell hostname)
PERSONALHOST := crojtini
ALTHOST := panela
ifneq (, $(findstring $(PERSONALHOST), $(HOSTNAME)))
CURRENT_HOST := personal
else ifneq (, $(findstring $(ALTHOST), $(HOSTNAME)))
CURRENT_HOST := alt
else
CURRENT_HOST := work
endif
PLAYBOOK_COMMAND := ansible-playbook -l $(CURRENT_HOST) main.yml
install: header
$(PLAYBOOK_COMMAND) --skip-tags shell,upgrade
osx: header
$(PLAYBOOK_COMMAND) -t osx
ssh: header
$(PLAYBOOK_COMMAND) -t ssh
dotfiles: header
$(PLAYBOOK_COMMAND) -t dotfiles
tmux: header
$(PLAYBOOK_COMMAND) -t tmux
fish: header
$(PLAYBOOK_COMMAND) -t fish
neovim: header
$(PLAYBOOK_COMMAND) -t neovim
upgrade: header
$(PLAYBOOK_COMMAND) -t upgrade
environments: header
$(PLAYBOOK_COMMAND) -t environments
git: header
$(PLAYBOOK_COMMAND) -t git
services: header
$(PLAYBOOK_COMMAND) -t services
iterm: header
$(PLAYBOOK_COMMAND) -t iterm
shell: header
# Requires privilege escalation because of the /etc/shells file
$(PLAYBOOK_COMMAND) -t fish,shell -K
header:
echo "Running on host: $(CURRENT_HOST)"
default: install upgrade