-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
47 lines (38 loc) · 831 Bytes
/
makefile
File metadata and controls
47 lines (38 loc) · 831 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
42
43
44
45
46
47
#
# WARP
# project makefile
#
# program vars
CD:=cd
PRE_CMT:=pre-commit
RM:=rm -rf
GALAXY:=ansible-galaxy
PLAYBOOK:=ansible-playbook
# paths
BOX_DIR:=box
BUILD_DIR:=build
ANSIBLE_DIR=$(BOX_DIR)/ansible
# box metadata
BOX_NAME:=mrzzy/warp-box
# phony build rules
.PHONY: all box clean lint apply ansible-deps
.DEFAULT: all
all: box
box: $(BOX_DIR)
cd $(BOX_DIR) && docker-compose build
lint: ansible-deps
$(PRE_CMT) run
# apply the ansible devbox playbook to the local machine
ansible-deps:
$(GALAXY) install --force -r $(ANSIBLE_DIR)/requirements.yaml
apply: $(ANSIBLE_DIR) ansible-deps
$(PLAYBOOK) \
--inventory 127.0.0.1, \
--connection local \
--ask-become-pass \
$(ANSIBLE_DIR)/system.yaml
$(PLAYBOOK) \
--inventory 127.0.0.1, \
--connection local \
--ask-become-pass \
$(ANSIBLE_DIR)/user.yaml