Closed jamiejackson closed 9 years ago
Hello,
The :vm
option should be a perfect fit for your use case:
config.trigger.after :destroy, :stdout => true, :force => true, :vm => "web" do
info "Removing provisioned directory contents: #{host_provisioned_dir}/*"
FileUtils.rm_rf Dir.glob("#{host_provisioned_dir}/*")
end
I'll try it out, thanks, Emilio.
On Tue, Nov 25, 2014 at 11:39 AM, Emiliano Ticci notifications@github.com wrote:
Hello,
The :vm option should be a perfect fit for your use case:
config.trigger.after :destroy, :stdout => true, :force => true, :vm => "web" do info "Removing provisioned directory contents: #{host_provisioneddir}/" FileUtils.rm_rf Dir.glob("#{host_provisioneddir}/")end
— Reply to this email directly or view it on GitHub https://github.com/emyl/vagrant-triggers/issues/28#issuecomment-64429629 .
Say I've got a multi-machine Vagrantfile:
Is there a way to tie the cleanup to the machine being destroyed?