-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (29 loc) · 965 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
30
31
32
33
34
35
36
37
38
39
40
41
MITOGEN_VERSION=0.3.4
PIP_DEPS='ansible<7' passlib
PIP_CMD=pip3 -q --disable-pip-version-check
all: deps test
down:
vagrant halt
up: mkdisk
vagrant up --no-provision
test: up
vagrant provision
mkdisk:
test -f .vagrant/test_zdisk.vdi || VBoxManage createmedium disk --filename .vagrant/test_zdisk.vdi --size 1024
rmdisk:
VBoxManage closemedium disk .vagrant/test_zdisk.vdi --delete
destroy: down
vagrant destroy
recreate: destroy up
reload: down up
deps:
${PIP_CMD} install --upgrade ${PIP_DEPS}
ansible-galaxy install -r requirements.yml
test -d ~/.ansible/mitogen-${MITOGEN_VERSION} || curl -sSL https://github.com/mitogen-hq/mitogen/archive/refs/tags/v${MITOGEN_VERSION}.tar.gz | tar xz -C ~/.ansible
ln -sfn mitogen-${MITOGEN_VERSION} ~/.ansible/mitogen-current
ssh:
vagrant ssh
deploy-local:
ansible-playbook -l nas.local -i inventories/nas/inventory.yml nas.yml
deploy:
ansible-playbook -l nas -i inventories/nas/inventory.yml nas.yml