394 Commits

Author SHA1 Message Date
Chris Roberts
7fbe8bcabc Fix plugin discovery loading when no data directory is available
If the local data directory is unavailable, there will be no local
file to use within the plugin manager. Check for local file before
returning result, otherwise just return an empty hash.
2019-06-21 11:15:39 -07:00
Chris Roberts
7c6b2963c3
Merge pull request #10911 from chrisroberts/f-plugin-loading
Support loading machine configuration without provider validation
2019-06-20 11:23:10 -07:00
Zhongcheng Lao
caae214bf7 Fix provider name not work when specified
Provider name should be symbol in guess_provider.
2019-06-17 08:22:50 +08:00
Chris Roberts
9bae0a7094 Support loading machine configuration without provider validation
Allow Vagrantfile#machine_config to load properly when the requested
provider may not be currently available. Update the Environment to
utilize this when searching for plugin information to properly allow
box provided Vagrantfiles to define required plugins.
2019-06-14 11:50:06 -07:00
Chris Roberts
50c4464d44 Support loading plugin information from nested Vagrantfiles
Since plugin installation happens when the environment is first
initialized, attempt to determine the provider in use and load
any box provided Vagrantfiles to include any plugin configuration
they may include.
2019-06-04 10:07:02 -07:00
Brian Cain
fefb702359
Introduce type and command triggers
This commit introduces some basic functionality for typed triggers:

- command
- action

Command triggers are triggers that will run before or after a given
sub-command.

Action triggers are for running triggers before or after internal
actions for Vagrant. This could be before or after a provision step,
before or after synced folders, or networking, etc.
2019-02-01 13:34:15 -08:00
Chris Roberts
1c480880f1 Add test coverage of local rgloader creation 2018-10-10 10:30:30 -07:00
Chris Roberts
006cea45e3 Provide rgloader for project local plugins 2018-10-09 16:27:47 -07:00
Chris Roberts
798fb81926 Force command to be re-run after installing local plugins
Reloading the Vagrantfile causes issue with multiple evaluations
where users expect single evaluation. Instead of allowing local
plugin installation to happen prior to command execution, force
halt after installation and the command to be re-run. This will
prevent multiple loads of the Vagrantfile within a single run.
2018-09-10 09:59:58 -07:00
Chris Roberts
e24728cb5a
Merge pull request #10155 from chrisroberts/f-plugin-load-config
Reset internal environment after plugin load
2018-08-30 11:30:14 -07:00
Chris Roberts
9b67655e45 Reset internal environment after plugin load
Force the vagrantfile and configuration loader to be rebuilt after
plugins have been loaded to properly allow newly introduced plugin
configurations to be properly supported within the Vagrantfile.
2018-08-30 10:44:09 -07:00
Chris Roberts
92109752a3 Fix local plugin prompt and add coverage 2018-08-30 10:35:16 -07:00
Chris Roberts
6c1a9dc58e Store box metadata of active guest
When a guest is created, the box metadata information is stored in the
machine data directory. This allows modifications to happen to the
Vagrantfile definition of the box in use (box name change, box version
change, etc) while still allowing the Machine instance of an active
guest successfully load the box currently backing it.
2018-08-02 11:01:36 -07:00
Chris Roberts
ae14f95124 Properly downcase answer for check. Default response to no. 2018-07-19 10:31:32 -07:00
Chris Roberts
ab39125570 Set options directly instead of lazy merging 2018-07-18 15:47:35 -07:00
Chris Roberts
c605b7d875 Update option name for local plugin installation 2018-07-17 15:35:25 -07:00
Chris Roberts
3223737734 Use env_local consistently internally 2018-07-17 14:49:41 -07:00
Chris Roberts
84c0aafe71 Support non-interactive local plugin install 2018-07-17 14:49:41 -07:00
Chris Roberts
40f4e6f67e Vagrant Environment isolated plugins
Adds support for plugins isolated to a specific `Vagrant::Environment`
which can be managed by the vagrant plugin command using the the
--local flag.
2018-07-17 14:49:41 -07:00
Chris Roberts
f3c5e86f28
Merge pull request #9504 from zachflower/feature/vagrant-aliases
Vagrant aliases
2018-04-06 15:39:18 -07:00
Josh Soref
1a5ddea9f4 Spelling fixes
* account
* addresses
* administrator
* afterwards
* because
* bridgeable
* capabilities
* capability
* checksum
* configuration
* configuration for
* configure
* criteria
* delimited
* delivered
* derivatives
* description
* detect
* directory
* display
* downloading
* during
* electric
* enabling
* encountered
* equivalent
* executable
* executed
* hashicorp
* hypervisor
* hyphens
* implementation
* incorporate
* inheritance
* initialize
* instance
* instead
* interactions
* invocable
* machine
* maximum
* message
* mounting
* overridden
* overwrite
* paramiko
* preparing
* provides
* provisioning
* recursively
* requested
* resetting
* retryable
* running
* satisfied
* searching
* sometimes
* specified
* successfully
* synced folders
* unauthorized
* underlying
* userprofile
* vagrant
* vagrantfile
* variable
* various
* version
* virtual
* windows
2018-03-14 14:41:04 +00:00
Zachary Flower
3dbcdea691 allow the alias file path to be defined via an environment variable 2018-02-25 22:32:13 -07:00
Zachary Flower
f46ebf5240 throw an exception when whitespace is found within an alias keyword 2018-02-16 13:28:57 -07:00
Chris Roberts
d2cad65053 Remove deprecated checkpoint integration 2018-01-16 15:21:22 -08:00
Chris Roberts
4ce0ee1a7d Add debug output when detecting provider for environment. 2017-07-06 12:30:57 -07:00
Aron Griffis
7c538b4504
Honor VAGRANT_PREFERRED_PROVIDERS in Environment#default_provider 2017-05-03 08:19:29 -04:00
Aron Griffis
f256fc882f
Rewrite Environment#default_provider to be less confusing 2017-05-03 08:19:03 -04:00
Chris Roberts
bfc2af4cf9 Always provide timeout on thread join to prevent deadlock errors 2017-03-27 12:58:39 -07:00
Chris Roberts
74438cc495 Merge pull request #8196 from chrisroberts/fix/expand-vagrantfile-path
Allow VAGRANT_DOTFILE_PATH to be expanded as expected.
2017-02-23 13:33:07 -08:00
Chris Roberts
959bdada82 Fix environment gems_path location 2017-02-01 12:43:16 -08:00
Chris Roberts
832c62f2aa Allow VAGRANT_DOTFILE_PATH to be expanded as expected.
This allows custom paths that include special characters like `~`
to be properly expanded instead of resulting in joined root path
with special characters included.
2017-01-12 14:01:25 -08:00
Alejandro Ojeda
50ca748b5c Fix Vagrant not prioritizing configured providers correctly
Fixes #7135: config.vm.provider not setting provider in multi-machine Vagrantfile
2016-08-25 03:34:23 +02:00
Carlos Rodrigues
218b697d5e This looks cleaner 2016-07-24 19:01:54 +01:00
Carlos Rodrigues
188a7dab0c Another try, without string substitution 2016-07-24 18:40:09 +01:00
Carlos Rodrigues
9ebc028745 Better checks, hopefully 2016-07-22 14:59:05 +01:00
Carlos Rodrigues
92104fec72 Use match instead of start_with 2016-07-22 14:39:44 +01:00
Carlos Rodrigues
bf0486e659 Vagrantfile-relative VAGRANT_DOTFILE_PATH 2016-07-22 14:08:18 +01:00
Mitchell Hashimoto
646414b347 core: don't make dotfile path if no Vagrantfile 2015-11-18 17:48:24 -08:00
Mitchell Hashimoto
baea923e9c commands/up: automatically install providers 2015-11-05 13:58:15 -08:00
Mitchell Hashimoto
69d9bc0fe8 Environment can_install_provider and install_provider 2015-11-05 11:50:10 -08:00
Mitchell Hashimoto
c17efbed75 core: ignore VAGRANT_DOTFILE_PATH if a child environment
This causes issues since the child environment almost certainly doesn't
share data with the parent. In a larger scope, we should find a way to
encode the data path somehow on `vagrant up`.
2015-10-16 10:28:30 -07:00
Mitchell Hashimoto
f0ddac8c9a providers/virtualbox: clone 2015-10-08 12:33:55 -04:00
Mitchell Hashimoto
2c936b2e37 providers/virtualbox: tidying up the linked clone feature 2015-10-06 14:11:41 -04:00
Manuel Pöter
f4d1d068f9 Merge branch 'master' into VB-linked-clone-support 2015-07-13 10:56:17 +02:00
Manuel Pöter
c3151c0b88 Ignore failure when trying to delete lock file.
Deleting the lock file can fail when another process is currently trying to acquire it (-> race condition).
It is safe to ignore this error since the other process will eventually acquire the lock and again try to delete the lock file.
2015-06-03 13:27:03 +02:00
Mikhail Zholobov
c4565b3c99 Create data dir only after the machine passes all checks 2015-02-12 14:32:16 +02:00
Seth Vargo
d2874064f4 Use .key? instead of .has_key? 2015-01-05 18:29:01 -05:00
Seth Vargo
6b48199346 Infer push name when only one strategy is defined, support multiple strategies 2014-12-08 11:35:15 -08:00
Seth Vargo
413565f961 Simplify the API for Environment#push
The API has a precondition that `name` is not nil
2014-12-08 11:35:10 -08:00
Seth Vargo
3871154a74 Ignore options that come back from the plugin for now 2014-12-08 11:35:10 -08:00