diff --git a/CHANGELOG.md b/CHANGELOG.md index d83fc4664..cf9cb0662 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ IMPROVEMENTS: - core: `has_plugin?` function now takes a second argument which is a version constraint requirement. [GH-4650] + - core: ".vagrantplugins" file in the same file as your Vagrantfile + will be loaded for defining inline plugins. [GH-3775] - commands/plugin: Plugin list machine-readable output contains the plugin name as the target for versions and other info. [GH-4506] - guests/arch: Support predictable network interface naming. [GH-4468] diff --git a/lib/vagrant/environment.rb b/lib/vagrant/environment.rb index 0647301d9..4c6c7b154 100644 --- a/lib/vagrant/environment.rb +++ b/lib/vagrant/environment.rb @@ -164,6 +164,15 @@ module Vagrant @local_data_path = Pathname.new(File.expand_path(opts[:local_data_path], @cwd)) end + # If we have a root path, load the ".vagrantplugins" file. + if root_path + plugins_file = root_path.join(".vagrantplugins") + if plugins_file.file? + @logger.info("Loading plugins file: #{plugins_file}") + load plugins_file + end + end + setup_local_data_path # Setup the default private key