-
Notifications
You must be signed in to change notification settings - Fork 84
/
.vagrantplugins
21 lines (17 loc) 路 766 Bytes
/
.vagrantplugins
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require_relative "puppet/chassis.rb"
module Chassis
@@dir = File.dirname(__FILE__)
def self.load_extension_plugins()
subplugins = Dir.glob(File.join(@@dir, "extensions", "*", ".vagrantplugins"))
# We also need to check the global plugins for .vagrantplugins as well.
global_ext_path = File.join(Dir.home, ".chassis", "extensions")
use_global_ext = Dir.exist?(global_ext_path) && ! Dir.empty?(global_ext_path)
if use_global_ext
global_ext_plugins = Dir.glob(global_ext_path + "/*/.vagrantplugins")
# If we have global extensions that have .vagrantplugins then combine the arrays
subplugins += global_ext_plugins unless global_ext_plugins.empty?
end
subplugins.each {|pluginfile| load pluginfile}
end
end
Chassis.load_extension_plugins()