summaryrefslogtreecommitdiffstats
path: root/vagrant/Makefile
blob: ce885c500715a4d8b240ea44afba2042ece40e22 (plain)
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
INVENTORY := ./vagrant_ansible_inventory
VSSH := ssh -F ssh-config-host

ifdef EXTRA_VARS
	ANSIBLE_EXTRA_VARS := -e '${EXTRA_VARS}'
	SSH_EXTRA_VARS := EXTRA_VARS='${EXTRA_VARS}'
endif

local:
	@ansible-playbook --inventory localhost, ${ANSIBLE_EXTRA_VARS} local.yml

hosts.update.only:
	@ansible-playbook --inventory=$(INVENTORY) ${ANSIBLE_EXTRA_VARS} hosts.update.yml

setup.prep.only:
	@ansible-playbook --inventory=$(INVENTORY) ${ANSIBLE_EXTRA_VARS} setup.prep.yml

setup.prep: local hosts.update.only setup.prep.only

setup.prep.copy:
	@ansible-playbook --inventory=$(INVENTORY) ${ANSIBLE_EXTRA_VARS} --start-at-task "copy ansible playbooks to setup machine" setup.prep.yml

setup.test.only:
	@ansible-playbook --inventory=$(INVENTORY) ${ANSIBLE_EXTRA_VARS} setup.test.yml

setup.cluster.only:
	@$(VSSH) setup "${SSH_EXTRA_VARS} make -C /home/vagrant/ansible setup.cluster"

setup.cluster: setup.prep setup.test.only setup.cluster.only

setup.clients:
	@$(VSSH) setup "${SSH_EXTRA_VARS} make -C /home/vagrant/ansible setup.clients"

setup.site: setup.cluster setup.clients

client1.test:
	@$(VSSH) client1 "sudo make -C /root/samba-integration-tests test"

.PHONY: local hosts.update.only setup.prep.only setup.prep setup.test.only setup.cluster.only setup.cluster setup.clients setup.site client1.test