diff --git a/CHANGELOG.md b/CHANGELOG.md index e2ea25d77..e5482939e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,8 @@ BUG FIXES: - provisioners/puppet: Manifest file can be a directory. [GH-4169] - provisioners/puppet: Properly escape facter variables for PowerShell on Windows guests. [GH-3959] + - provisioners/puppet: When provisioning fails, don't repeat all of + stdout/stderr. [GH-4303] - provisioners/salt: Update salt minion version on Windows. [GH-3932] - provisioners/shell: If args is an array and contains numbers, it no longer crashes. [GH-4234] diff --git a/plugins/provisioners/puppet/provisioner/puppet.rb b/plugins/provisioners/puppet/provisioner/puppet.rb index fe00f3f47..f49316bf7 100644 --- a/plugins/provisioners/puppet/provisioner/puppet.rb +++ b/plugins/provisioners/puppet/provisioner/puppet.rb @@ -159,7 +159,12 @@ module VagrantPlugins "vagrant.provisioners.puppet.running_puppet", manifest: config.manifest_file)) - @machine.communicate.sudo(command, elevated: true, good_exit: [0,2]) do |type, data| + opts = { + elevated: true, + error_key: :ssh_bad_exit_status_muted, + good_exit: [0,2], + } + @machine.communicate.sudo(command, opts) do |type, data| if !data.chomp.empty? @machine.ui.info(data.chomp) end diff --git a/templates/locales/en.yml b/templates/locales/en.yml index f10f64c0e..594b857fd 100644 --- a/templates/locales/en.yml +++ b/templates/locales/en.yml @@ -969,8 +969,10 @@ en: %{stderr} ssh_bad_exit_status_muted: |- - The SSH command responded with a non-zero exit status. - Vagrant assumes that this means the command failed! + The SSH command responded with a non-zero exit status. Vagrant + assumes that this means the command failed. The output for this command + should be in the log above. Please read the output to determine what + went wrong. ssh_connect_eacces: |- SSH is getting permission denied errors when attempting to connect to the IP for SSH. This is usually caused by network rules and not being