2012-11-07 05:28:44 +00:00
|
|
|
require "vagrant"
|
|
|
|
|
|
|
|
module VagrantPlugins
|
|
|
|
module Kernel_V2
|
|
|
|
# This is the "kernel" of Vagrant and contains the configuration classes
|
|
|
|
# that make up the core of Vagrant for V2.
|
|
|
|
class Plugin < Vagrant.plugin("2")
|
|
|
|
name "kernel"
|
|
|
|
description <<-DESC
|
|
|
|
The kernel of Vagrant. This plugin contains required items for even
|
|
|
|
basic functionality of Vagrant version 2.
|
|
|
|
DESC
|
|
|
|
|
2012-11-19 06:55:30 +00:00
|
|
|
# Core configuration keys provided by the kernel. Note that unlike
|
|
|
|
# "kernel_v1", none of these configuration classes are upgradable.
|
|
|
|
# This is by design, since we can't be sure if they're upgradable
|
|
|
|
# until another version is available.
|
|
|
|
config("ssh") do
|
2012-11-07 05:28:44 +00:00
|
|
|
require File.expand_path("../config/ssh", __FILE__)
|
|
|
|
SSHConfig
|
|
|
|
end
|
|
|
|
|
2012-11-19 06:55:30 +00:00
|
|
|
config("package") do
|
2012-11-07 05:28:44 +00:00
|
|
|
require File.expand_path("../config/package", __FILE__)
|
|
|
|
PackageConfig
|
|
|
|
end
|
|
|
|
|
2014-10-23 20:01:43 +00:00
|
|
|
config("push") do
|
|
|
|
require File.expand_path("../config/push", __FILE__)
|
|
|
|
PushConfig
|
|
|
|
end
|
|
|
|
|
2012-11-19 06:55:30 +00:00
|
|
|
config("vagrant") do
|
2012-11-07 05:28:44 +00:00
|
|
|
require File.expand_path("../config/vagrant", __FILE__)
|
|
|
|
VagrantConfig
|
|
|
|
end
|
|
|
|
|
2012-11-19 06:55:30 +00:00
|
|
|
config("vm") do
|
2012-11-07 05:28:44 +00:00
|
|
|
require File.expand_path("../config/vm", __FILE__)
|
|
|
|
VMConfig
|
|
|
|
end
|
2018-03-08 22:20:21 +00:00
|
|
|
|
2018-04-26 17:47:28 +00:00
|
|
|
plugins = Vagrant::Plugin::Manager.instance.installed_plugins
|
|
|
|
if !plugins.keys.include?("vagrant-triggers")
|
|
|
|
config("trigger") do
|
|
|
|
require File.expand_path("../config/trigger", __FILE__)
|
|
|
|
TriggerConfig
|
|
|
|
end
|
|
|
|
else
|
|
|
|
if !ENV["VAGRANT_USE_VAGRANT_TRIGGERS"]
|
|
|
|
$stderr.puts <<-EOF
|
|
|
|
WARNING: Vagrant has detected the `vagrant-triggers` plugin. This plugin conflicts
|
|
|
|
with the internal triggers implementation. Please uninstall the `vagrant-triggers`
|
|
|
|
plugin and run the command again if you wish to use the core trigger feature. To
|
|
|
|
uninstall the plugin, run the command shown below:
|
|
|
|
|
|
|
|
vagrant plugin uninstall vagrant-triggers
|
|
|
|
|
|
|
|
Note that the community plugin `vagrant-triggers` and the core trigger feature
|
|
|
|
in Vagrant do not have compatible syntax.
|
|
|
|
|
|
|
|
To disable this warning, set the environment variable `VAGRANT_USE_VAGRANT_TRIGGERS`.
|
|
|
|
EOF
|
|
|
|
end
|
2018-03-08 22:20:21 +00:00
|
|
|
end
|
2012-11-07 05:28:44 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|