From 3476491881dfd71aea3265adfa10ed09d3803306 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 15 Jul 2015 10:57:38 -0700 Subject: [PATCH] update CHANGELOG --- CHANGELOG.md | 1 + plugins/provisioners/puppet/provisioner/puppet.rb | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c872134c..dd2d3ae7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ BUG FIXES: - hosts/linux: NFS can be configured without `$TMP` set on the host [GH-5954] - providers/virtulabox: remove UNC path conversion on Windows since it caused mounting regressions [GH-5933] + - provisioners/puppet: Windows Puppet 4 paths work correctly [GH-5967] - provisioners/salt: fix "dummy config" error on bootstrap [GH-5936] ## 1.7.3 (July 10, 2015) diff --git a/plugins/provisioners/puppet/provisioner/puppet.rb b/plugins/provisioners/puppet/provisioner/puppet.rb index e7c598140..f1987dbd5 100644 --- a/plugins/provisioners/puppet/provisioner/puppet.rb +++ b/plugins/provisioners/puppet/provisioner/puppet.rb @@ -146,14 +146,16 @@ module VagrantPlugins end def verify_binary(binary) + # Determine the command to use to test whether Puppet is available. + # This is very platform dependent. test_cmd = "sh -c 'command -v #{binary}'" if windows? + test_cmd = "which #{binary}" if @config.binary_path test_cmd = "where \"#{@config.binary_path}:#{binary}\"" - else - test_cmd = "which #{binary}" end end + if !machine.communicate.test(test_cmd) @config.binary_path = "/opt/puppetlabs/bin/" @machine.communicate.sudo( @@ -217,9 +219,10 @@ module VagrantPlugins end puppet_bin = "puppet" - if(@config.binary_path) + if @config.binary_path puppet_bin = File.join(@config.binary_path, puppet_bin) end + command = "#{facter} #{puppet_bin} apply #{options}" if config.working_directory if windows?