Skip to content

Commit

Permalink
Merge pull request hashicorp#964 from jbraeuer/puppet-modulepath-fix
Browse files Browse the repository at this point in the history
Fix problem that Puppet module-paths were re-ordered by Vagrant.
  • Loading branch information
mitchellh committed Jun 8, 2012
2 parents be55534 + ae92895 commit e1f00c6
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 e1f00c6

Please sign in to comment.