Module: Vagrant

Defined in:
lib/vagrant/errors.rb,
lib/vagrant.rb,
lib/vagrant/ui.rb,
lib/vagrant/vm.rb,
lib/vagrant/box.rb,
lib/vagrant/cli.rb,
lib/vagrant/ssh.rb,
lib/vagrant/util.rb,
lib/vagrant/guest.rb,
lib/vagrant/hosts.rb,
lib/vagrant/action.rb,
lib/vagrant/config.rb,
lib/vagrant/driver.rb,
lib/vagrant/plugin.rb,
lib/vagrant/command.rb,
lib/vagrant/version.rb,
lib/vagrant/registry.rb,
lib/vagrant/config/vm.rb,
lib/vagrant/hosts/bsd.rb,
lib/vagrant/util/busy.rb,
lib/vagrant/command/up.rb,
lib/vagrant/config/nfs.rb,
lib/vagrant/config/ssh.rb,
lib/vagrant/config/top.rb,
lib/vagrant/data_store.rb,
lib/vagrant/guest/arch.rb,
lib/vagrant/guest/base.rb,
lib/vagrant/guest/suse.rb,
lib/vagrant/hosts/arch.rb,
lib/vagrant/hosts/base.rb,
lib/vagrant/command/box.rb,
lib/vagrant/command/gem.rb,
lib/vagrant/command/ssh.rb,
lib/vagrant/config/base.rb,
lib/vagrant/downloaders.rb,
lib/vagrant/environment.rb,
lib/vagrant/guest/linux.rb,
lib/vagrant/hosts/linux.rb,
lib/vagrant/command/base.rb,
lib/vagrant/command/halt.rb,
lib/vagrant/command/init.rb,
lib/vagrant/guest/debian.rb,
lib/vagrant/guest/fedora.rb,
lib/vagrant/guest/gentoo.rb,
lib/vagrant/guest/redhat.rb,
lib/vagrant/guest/ubuntu.rb,
lib/vagrant/hosts/fedora.rb,
lib/vagrant/hosts/gentoo.rb,
lib/vagrant/provisioners.rb,
lib/vagrant/test_helpers.rb,
lib/vagrant/util/counter.rb,
lib/vagrant/action/runner.rb,
lib/vagrant/action/vm/nfs.rb,
lib/vagrant/action/warden.rb,
lib/vagrant/communication.rb,
lib/vagrant/config/loader.rb,
lib/vagrant/guest/freebsd.rb,
lib/vagrant/guest/openbsd.rb,
lib/vagrant/guest/solaris.rb,
lib/vagrant/hosts/freebsd.rb,
lib/vagrant/hosts/windows.rb,
lib/vagrant/util/platform.rb,
lib/vagrant/action/builder.rb,
lib/vagrant/action/builtin.rb,
lib/vagrant/action/env/set.rb,
lib/vagrant/action/vm/boot.rb,
lib/vagrant/action/vm/halt.rb,
lib/vagrant/box_collection.rb,
lib/vagrant/command/reload.rb,
lib/vagrant/command/resume.rb,
lib/vagrant/command/status.rb,
lib/vagrant/config/package.rb,
lib/vagrant/config/vagrant.rb,
lib/vagrant/hosts/opensuse.rb,
lib/vagrant/util/file_mode.rb,
lib/vagrant/util/retryable.rb,
lib/vagrant/util/safe_exec.rb,
lib/vagrant/util/safe_puts.rb,
lib/vagrant/command/box_add.rb,
lib/vagrant/command/destroy.rb,
lib/vagrant/command/package.rb,
lib/vagrant/command/suspend.rb,
lib/vagrant/util/network_ip.rb,
lib/vagrant/util/subprocess.rb,
lib/vagrant/action/vm/export.rb,
lib/vagrant/action/vm/import.rb,
lib/vagrant/action/vm/resume.rb,
lib/vagrant/command/box_list.rb,
lib/vagrant/config/container.rb,
lib/vagrant/config/vm/sub_vm.rb,
lib/vagrant/downloaders/base.rb,
lib/vagrant/downloaders/file.rb,
lib/vagrant/downloaders/http.rb,
lib/vagrant/action/box/verify.rb,
lib/vagrant/action/vm/destroy.rb,
lib/vagrant/action/vm/network.rb,
lib/vagrant/action/vm/package.rb,
lib/vagrant/action/vm/suspend.rb,
lib/vagrant/command/provision.rb,
lib/vagrant/communication/ssh.rb,
lib/vagrant/driver/virtualbox.rb,
lib/vagrant/guest/linux/error.rb,
lib/vagrant/provisioners/base.rb,
lib/vagrant/provisioners/chef.rb,
lib/vagrant/util/is_port_open.rb,
lib/vagrant/action/box/destroy.rb,
lib/vagrant/action/box/package.rb,
lib/vagrant/action/environment.rb,
lib/vagrant/command/box_remove.rb,
lib/vagrant/command/ssh_config.rb,
lib/vagrant/communication/base.rb,
lib/vagrant/guest/linux/config.rb,
lib/vagrant/provisioners/shell.rb,
lib/vagrant/action/box/download.rb,
lib/vagrant/action/vm/check_box.rb,
lib/vagrant/action/vm/customize.rb,
lib/vagrant/action/vm/host_name.rb,
lib/vagrant/action/vm/provision.rb,
lib/vagrant/provisioners/puppet.rb,
lib/vagrant/action/box/unpackage.rb,
lib/vagrant/command/start_mixins.rb,
lib/vagrant/command/box_repackage.rb,
lib/vagrant/config/error_recorder.rb,
lib/vagrant/config/vm/provisioner.rb,
lib/vagrant/driver/virtualbox_4_0.rb,
lib/vagrant/driver/virtualbox_4_1.rb,
lib/vagrant/driver/virtualbox_4_2.rb,
lib/vagrant/action/general/package.rb,
lib/vagrant/action/vm/default_name.rb,
lib/vagrant/driver/virtualbox_base.rb,
lib/vagrant/provisioners/chef_solo.rb,
lib/vagrant/util/template_renderer.rb,
lib/vagrant/action/general/validate.rb,
lib/vagrant/action/vm/discard_state.rb,
lib/vagrant/action/vm/forward_ports.rb,
lib/vagrant/action/vm/sane_defaults.rb,
lib/vagrant/action/vm/share_folders.rb,
lib/vagrant/provisioners/chef_client.rb,
lib/vagrant/util/line_ending_helpers.rb,
lib/vagrant/util/stacked_proc_runner.rb,
lib/vagrant/action/vm/check_accessible.rb,
lib/vagrant/provisioners/puppet_server.rb,
lib/vagrant/action/vm/match_mac_address.rb,
lib/vagrant/action/vm/prune_nfs_exports.rb,
lib/vagrant/action/vm/package_vagrantfile.rb,
lib/vagrant/action/vm/provisioner_cleanup.rb,
lib/vagrant/action/vm/setup_package_files.rb,
lib/vagrant/util/ansi_escape_code_remover.rb,
lib/vagrant/action/vm/clean_machine_folder.rb,
lib/vagrant/action/vm/clear_shared_folders.rb,
lib/vagrant/action/general/check_virtualbox.rb,
lib/vagrant/action/vm/check_guest_additions.rb,
lib/vagrant/action/vm/check_port_collisions.rb,
lib/vagrant/action/vm/clear_forwarded_ports.rb,
lib/vagrant/util/hash_with_indifferent_access.rb,
lib/vagrant/action/vm/clear_network_interfaces.rb,
lib/vagrant/action/vm/destroy_unused_network_interfaces.rb

Overview

TODO:

  • env.lock

Defined Under Namespace

Modules: Action, Command, Communication, Config, Downloaders, Driver, Errors, Guest, Hosts, Provisioners, TestHelpers, UI, Util Classes: Box, BoxCollection, CLI, DataStore, Environment, Plugin, Registry, SSH, VM

Constant Summary collapse

Version =

This will always be up to date with the current version of Vagrant, since it is used to generate the gemspec and is also the source of the version for vagrant -v

File.read(File.expand_path('../../../VERSION',  __FILE__)).strip
VERSION =
Version

Class Method Summary collapse

Class Method Details

.actionsObject

Returns a Vagrant::Registry object that contains all the built-in middleware stacks.



84
85
86
# File 'lib/vagrant.rb', line 84

def self.actions
  @actions ||= Vagrant::Action::Builtin.new
end

.commandsObject

Global registry of commands that are available via the CLI.

This registry is used to look up the sub-commands that are available to Vagrant.



98
99
100
# File 'lib/vagrant.rb', line 98

def self.commands
  @commands ||= Registry.new
end

.config_keysObject

Global registry of config keys that are available.

This registry is used to look up the keys for config objects. For example, config.vagrant looks up the :vagrant config key for the configuration class to use.



107
108
109
# File 'lib/vagrant.rb', line 107

def self.config_keys
  @config_keys ||= Registry.new
end

.guestsObject

Global registry of available guest classes and shortcut symbols associated with them.

This registry is used to look up the shortcuts for config.vm.guest.



125
126
127
# File 'lib/vagrant.rb', line 125

def self.guests
  @guests ||= Registry.new
end

.hostsObject

Global registry of available host classes and shortcut symbols associated with them.

This registry is used to look up the shorcuts for config.vagrant.host, or to query all hosts for automatically detecting the host system. The registry is global to all of Vagrant.



117
118
119
# File 'lib/vagrant.rb', line 117

def self.hosts
  @hosts ||= Registry.new
end

.provisionersObject

Global registry of provisioners.

This registry is used to look up the provisioners provided for config.vm.provision.



133
134
135
# File 'lib/vagrant.rb', line 133

def self.provisioners
  @provisioners ||= Registry.new
end

.source_rootObject

The source root is the path to the root directory of the Vagrant gem.



90
91
92
# File 'lib/vagrant.rb', line 90

def self.source_root
  @source_root ||= Pathname.new(File.expand_path('../../', __FILE__))
end