Sha256: 1090fe112228123a9dc48526b212a3708809b98a254505685a3c02d8f2501f66

Contents?: true

Size: 549 Bytes

Versions: 5

Compression:

Stored size: 549 Bytes

Contents

require_relative 'common'

module Kontena
  module Machine
    module Vagrant
      class MasterDestroyer
        include Kontena::Machine::Vagrant::Common
        include Kontena::Cli::ShellSpinner

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

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
krates-plugin-vagrant-0.3.3 lib/kontena/machine/vagrant/master_destroyer.rb
krates-plugin-vagrant-0.3.2 lib/kontena/machine/vagrant/master_destroyer.rb
krates-plugin-vagrant-0.3.1 lib/kontena/machine/vagrant/master_destroyer.rb
kontena-plugin-vagrant-0.3.1 lib/kontena/machine/vagrant/master_destroyer.rb
kontena-plugin-vagrant-0.3.0 lib/kontena/machine/vagrant/master_destroyer.rb