File: plugin.rb

package info (click to toggle)
vagrant 2.2.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 8,072 kB
  • sloc: ruby: 80,731; sh: 369; makefile: 9; lisp: 1
file content (68 lines) | stat: -rw-r--r-- 2,183 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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

      # 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
        require File.expand_path("../config/ssh", __FILE__)
        SSHConfig
      end

      config("package") do
        require File.expand_path("../config/package", __FILE__)
        PackageConfig
      end

      config("push") do
        require File.expand_path("../config/push", __FILE__)
        PushConfig
      end

      config("vagrant") do
        require File.expand_path("../config/vagrant", __FILE__)
        VagrantConfig
      end

      config("vm") do
        require File.expand_path("../config/vm", __FILE__)
        VMConfig
      end

      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
      end
    end
  end
end