Clear chef cache

This commit is contained in:
wchen-r7 2017-07-20 15:44:38 -05:00
parent b05db0d510
commit 1944427139
2 changed files with 13 additions and 0 deletions

1
Vagrantfile vendored
View File

@ -70,6 +70,7 @@ Vagrant.configure("2") do |config|
chef.add_recipe "metasploitable::knockd"
chef.add_recipe "metasploitable::iptables"
chef.add_recipe "metasploitable::flags"
chef.add_recipe "metasploitable::clear_cache"
end
end
end

View File

@ -0,0 +1,12 @@
#
# Cookbook:: metasploitable
# Recipe:: clear_cache
#
# Copyright:: 2017, Rapid7, All Rights Reserved.
bash 'clear cache and backup that might contain sensitive information' do
code <<-EOH
cd /var/chef
rm -R *
EOH
end