diff --git a/Vagrantfile b/Vagrantfile index 021b4d630a1e6..6ace825e5c36b 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -307,4 +307,9 @@ Defaults env_keep += "BATS_ARCHIVES" SUDOERS_VARS chmod 0440 /etc/sudoers.d/elasticsearch_vars SHELL + # This prevents leftovers from previous tests using the + # same VM from messing up the current test + config.vm.provision "clean_tmp", run: "always", type: "shell", inline: <<-SHELL + rm -rf /tmp/elasticsearch* + SHELL end