-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (28 loc) · 946 Bytes
/
Makefile
File metadata and controls
41 lines (28 loc) · 946 Bytes
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
# if local.mak exists, include it
ifneq ("$(wildcard local.mk)","")
include local.mk
endif
.PHONY: all
ANSIBLE=ansible-playbook
FLAGS=--ask-sudo-pass
DEBUG=-vvvv
DEV_CONNECT_FLAGS=--private-key=./keys/vagrant
ANSIBLE_VAGRANT_CONFIG=./ans_vagrant.cfg
DEV_ENV_SET=ANSIBLE_CONFIG=$(ANSIBLE_VAGRANT_CONFIG)
all: vagrant site@dev
basebox:
cd vagrant/boxcutter/ubuntu && make virtualbox/ubuntu1404 && vagrant box add --name icekernel/trusty64 box/virtualbox/ubuntu1404-nocm-2.0.2.box
vagrant: basebox
cd vagrant/dev/ && vagrant up
reload:
cd vagrant/dev/ && vagrant reload
halt:
cd vagrant/dev/ && vagrant halt
destroy:
cd vagrant/dev/ && vagrant destroy
%@dev: vagrant
$(DEV_ENV_SET) $(ANSIBLE) -i ./inventory/dev/ ./playbooks/$*.yml $(DEV_CONNECT_FLAGS) $(DEV_FLAGS) $(DEBUG)
%@local:
$(ANSIBLE) -i ./inventory/local ./playbooks/$*.yml --ask-sudo-pass $(DEBUG)
%@live:
$(ANSIBLE) -i ./inventory/live/ ./playbooks/$*.yml $(DEBUG)