-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
29 lines (22 loc) · 831 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
#!/usr/bin/make -f
.DEFAULT_GOAL := apply
.PHONY: apply
DEFAULT_IMAGE:=loki
IMAGE:=$(shell echo "$${IMAGE:-$(DEFAULT_IMAGE)}")
clean:
@docker-compose rm -fs $(IMAGE)
start:
@docker-compose up -d $(IMAGE)
shell: start
@docker exec -it $(IMAGE) bash
test: start
@docker exec $(IMAGE) ansible --version
@docker exec $(IMAGE) wait-for-boot
@docker exec $(IMAGE) ansible-galaxy install -r /etc/ansible/roles/default/tests/requirements.yml
@docker exec $(IMAGE) env ANSIBLE_FORCE_COLOR=yes \
ansible-playbook /etc/ansible/roles/default/tests/playbook.yml
apply:
@mkdir -p target/ .ansible/galaxy-roles
@rsync --delete --exclude=.ansible/galaxy-roles -a ./ .ansible/galaxy-roles/node-dev/
@ansible-galaxy install -p .ansible/galaxy-roles -r requirements.yml
@ansible-playbook -i localhost, --ask-become-pass local.yml