Skip to content

Commit

Permalink
Fix problem that Puppet module-paths were re-ordered by Vagrant.
Browse files Browse the repository at this point in the history
Puppet module-path were re-ordered by Vagrant due to the use of a
hash. This could lead to unpredictable results.
  • Loading branch information
Jens Braeuer committed Jun 7, 2012
1 parent b393de0 commit ae92895
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions plugins/provisioners/puppet/provisioner/puppet.rb
Expand Up @@ -118,9 +118,9 @@ def share_module_paths
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

Expand All @@ -137,7 +137,8 @@ def verify_binary(binary)

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(" ")

Expand Down

0 comments on commit ae92895

Please sign in to comment.