-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
61 lines (42 loc) · 1.19 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
HOSTS=-i etc/hosts
TARGETS?=all
PLAYBOOK=site.yml
BOOTSTRAP_PLAYBOOK=bootstrap.yml
DEBUG?=
ARGS?=
FINAL_ARGS?=${ARGS} --ask-sudo-pass ${DEBUG}
ANSIBLE_NOCOWS=1
ANSIBLE_BIN=/usr/bin/env ansible-playbook
ALL_FLAGS=${HOSTS} ${FINAL_ARGS}
install:
ANSIBLE_TARGETS=${TARGETS} ${ANSIBLE_BIN} ${PLAYBOOK} ${DEBUG} ${ALL_FLAGS}
debug:
DEBUG=-vvvv make install
bootstrap: ARGS=-c paramiko --ask-pass ${DEBUG}
bootstrap:
ANSIBLE_TARGETS=${TARGETS} ${ANSIBLE_BIN} ${BOOTSTRAP_PLAYBOOK} ${ALL_FLAGS}
tags:
ANSIBLE_TARGETS=${TARGETS} ${ANSIBLE_BIN} ${PLAYBOOK} --tags ${TAGS} ${ALL_FLAGS}
debug-tags:
TAGS=${TAGS} DEBUG=-vvvv make tags
local: TARGETS=local
local:
TARGETS=${TARGETS} make install
local-tags:
ARGS="--tags ${TAGS}" make local
local-tags-debug:
DEBUG=-vvvv make local-tags
local-debug: TARGETS=local
local-debug:
TARGETS=${TARGETS} ${ANSIBLE_BIN} ${PLAYBOOK} ${DEBUG} ${ALL_FLAGS}
ssh-key:
ssh-copy-id -i ~/.ssh/id_rsa.pub ciarand@${TARGET}
dotfiles:
TAGS=dotfiles make local-tags
editor:
TAGS=editor make local-tags
editor-debug:
TAGS=editor make local-tags-debug
deps:
ansible-galaxy install -r reqs
.PHONY: install debug dotfiles dotfiles-debug go go-debug local tags ssh-key deps