Puppet retains default module path even when custom is set [GH-1207]

This commit is contained in:
Mitchell Hashimoto 2013-03-19 15:23:37 -07:00
parent ec1bae0ae7
commit 6babeb4188
2 changed files with 13 additions and 1 deletions

View File

@ -1,5 +1,10 @@
## 1.1.3 (unreleased)
IMPROVEMENTS:
- Puppet apply provisioner now retains the default module path
even while specifying custom module paths. [GH-1207]
BUG FIXES:
- Attempt to re-establish SSH connection on `Net::SSH::Disconnect`

View File

@ -70,7 +70,14 @@ module VagrantPlugins
def run_puppet_apply
options = [config.options].flatten
module_paths = @module_paths.map { |_, to| to }
options << "--modulepath '#{module_paths.join(':')}'" if !@module_paths.empty?
if !@module_paths.empty?
# Prepend the default module path
module_paths.unshift("/etc/puppet/modules")
# Add the command line switch to add the module path
options << "--modulepath '#{module_paths.join(':')}'"
end
options << @manifest_file
options = options.join(" ")