summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--vagrant/Makefile10
2 files changed, 13 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 02a6dc2..40b0879 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,6 @@
.PHONY: test
test:
@$(MAKE) -C vagrant setup.site
+
+clean:
+ @$(MAKE) -C vagrant clean
diff --git a/vagrant/Makefile b/vagrant/Makefile
index 1702e4d..cfcbb6d 100644
--- a/vagrant/Makefile
+++ b/vagrant/Makefile
@@ -1,5 +1,6 @@
INVENTORY := ./vagrant_ansible_inventory
VSSH := ssh -F ssh-config-host
+VAGRANT := vagrant
ifdef EXTRA_VARS
ANSIBLE_EXTRA_VARS := -e '${EXTRA_VARS}'
@@ -39,4 +40,13 @@ setup.site: setup.cluster setup.clients client.test
client1.test:
@$(VSSH) client1 "sudo make -C /root/samba-integration-tests test"
+clean_vagrant:
+ @$(VAGRANT) destroy -f
+ @rm -rf .vagrant
+
+clean_generated_files:
+ @rm -f Vagrantfile ansible/distro-vars.yml ansible/vagrant_ansible_inventory ansible/ssh-config-setup vagrant_ansible_inventory ssh-config-host
+
+clean: clean_generated_files clean_vagrant
+
.PHONY: local hosts.update.only setup.prep.only setup.prep setup.test.only setup.cluster.only setup.cluster setup.clients client.test setup.site client1.test