Sha256: 6d19d61f0daaf623dd8123fd067d525156c965c893af685205387a1f77e26ce8

Contents?: true

Size: 617 Bytes

Versions: 10

Compression:

Stored size: 617 Bytes

Contents

module Vagrant
  module Command
    class ProvisionCommand < NamedBase
      register "provision", "Rerun the provisioning scripts on a running VM"

      def execute
        target_vms.each do |vm|
          if vm.created?
            if !vm.vm.accessible?
              raise Errors::VMInaccessible
            elsif vm.vm.running?
              vm.provision
            else
              vm.env.ui.info I18n.t("vagrant.commands.common.vm_not_running")
            end
          else
            vm.env.ui.info I18n.t("vagrant.commands.common.vm_not_created")
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
vagrantup-0.8.9 lib/vagrant/command/provision.rb
vagrantup-0.8.8 lib/vagrant/command/provision.rb
vagrantup-0.8.7 lib/vagrant/command/provision.rb
vagrantup-0.8.6 lib/vagrant/command/provision.rb
vagrantup-0.8.10 lib/vagrant/command/provision.rb
vagrant-0.8.10 lib/vagrant/command/provision.rb
vagrant-0.8.8 lib/vagrant/command/provision.rb
vagrant-0.8.7 lib/vagrant/command/provision.rb
rvagrant-0.8.7.dev lib/vagrant/command/provision.rb
vagrant-0.8.6 lib/vagrant/command/provision.rb