Fix problem that Puppet module-paths were re-ordered by Vagrant.
Puppet module-path were re-ordered by Vagrant due to the use of a hash. This could lead to unpredictable results.
This commit is contained in:
parent
b393de052f
commit
ae92895411
|
@ -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(" ")
|
||||
|
||||
|
|
Loading…
Reference in New Issue