Sha256: 3e5b6feba494844c7d63ebe690f4e537646d1dad56da569246b6ee816e99a894

Contents?: true

Size: 742 Bytes

Versions: 6

Compression:

Stored size: 742 Bytes

Contents

module Vagrant
  module Actions
    module VM
      class Start < Base
        def prepare
          # Start is a "meta-action" so it really just queues up a bunch
          # of other actions in its place:
          steps = [Boot]
          if !@runner.vm || !@runner.vm.saved?
            steps.unshift([Customize, ForwardPorts, SharedFolders, Network])
            steps << Provision if provision?
          end

          steps.flatten.each do |action_klass|
            @runner.add_action(action_klass, options)
          end
        end

        def provision?
          enabled = options[:provision].nil? ? true : options[:provision]
          !@runner.env.config.vm.provisioner.nil? && enabled
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
vagrantup-0.4.3.dev lib/vagrant/actions/vm/start.rb
vagrantup-0.4.1 lib/vagrant/actions/vm/start.rb
vagrantup-0.4.0 lib/vagrant/actions/vm/start.rb
vagrant-0.4.2 lib/vagrant/actions/vm/start.rb
vagrant-0.4.1 lib/vagrant/actions/vm/start.rb
vagrant-0.4.0 lib/vagrant/actions/vm/start.rb