Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

Commit

Permalink
Remove tmp dir after VM deploy #50
Browse files Browse the repository at this point in the history
  • Loading branch information
vterdunov committed Apr 6, 2018
1 parent bf99c62 commit 771436e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/workers/vmware/deploy_ova.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'fileutils'
require_relative '../abstract_worker'
require_relative '../../services/downloader'
require_relative '../../services/unpacker'
Expand All @@ -21,5 +22,7 @@ def do_work(vim, datacenter, params)
$slacker.notify("VM `#{params[:vmname]}` has been deployed. IP: #{ip}",
to: params[:message_to],
level: 'good')
ensure
FileUtils.remove_dir(tmp_dir)
end
end

0 comments on commit 771436e

Please sign in to comment.