Class: Kontena::Machine::Vagrant::MasterDestroyer

Inherits:
Object
  • Object
show all
Includes:
Cli::ShellSpinner, Common
Defined in:
lib/kontena/machine/vagrant/master_destroyer.rb

Instance Method Summary collapse

Methods included from Common

#erb, #run_command

Instance Method Details

#run!Object



10
11
12
13
14
15
16
17
# File 'lib/kontena/machine/vagrant/master_destroyer.rb', line 10

def run!
  vagrant_path = "#{Dir.home}/.krates/vagrant_master"
  Dir.chdir(vagrant_path) do
    spinner "Triggering termination of Krates Master from Vagrant"
    run_command('vagrant destroy -f')
    FileUtils.remove_entry_secure(vagrant_path)
  end
end