Merge pull request #964 from jbraeuer/puppet-modulepath-fix

Fix problem that Puppet module-paths were re-ordered by Vagrant.
This commit is contained in:
Mitchell Hashimoto 2012-06-08 10:24:38 -07:00
commit e1f00c6c27
1 changed files with 4 additions and 3 deletions

View File

@ -118,9 +118,9 @@ module VagrantPlugins
end
def set_module_paths
@module_paths = {}
@module_paths = []
@expanded_module_paths.each_with_index do |path, i|
@module_paths[path] = File.join(config.pp_path, "modules-#{i}")
@module_paths << [path, File.join(config.pp_path, "modules-#{i}"]
end
end
@ -137,7 +137,8 @@ module VagrantPlugins
def run_puppet_client
options = [config.options].flatten
options << "--modulepath '#{@module_paths.values.join(':')}'" if !@module_paths.empty?
module_paths = @module_paths.map { |_, to| to }
options << "--modulepath '#{module_paths.join(':')}'" if !@module_paths.empty?
options << @manifest_file
options = options.join(" ")