provisioners/puppet: don't repeat output when prov fails [GH-4303]

This commit is contained in:
Mitchell Hashimoto 2014-08-06 11:11:12 -07:00
parent 1cc78dc224
commit b516881d47
3 changed files with 12 additions and 3 deletions

View File

@ -39,6 +39,8 @@ BUG FIXES:
- provisioners/puppet: Manifest file can be a directory. [GH-4169] - provisioners/puppet: Manifest file can be a directory. [GH-4169]
- provisioners/puppet: Properly escape facter variables for PowerShell - provisioners/puppet: Properly escape facter variables for PowerShell
on Windows guests. [GH-3959] 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/salt: Update salt minion version on Windows. [GH-3932]
- provisioners/shell: If args is an array and contains numbers, it no - provisioners/shell: If args is an array and contains numbers, it no
longer crashes. [GH-4234] longer crashes. [GH-4234]

View File

@ -159,7 +159,12 @@ module VagrantPlugins
"vagrant.provisioners.puppet.running_puppet", "vagrant.provisioners.puppet.running_puppet",
manifest: config.manifest_file)) 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? if !data.chomp.empty?
@machine.ui.info(data.chomp) @machine.ui.info(data.chomp)
end end

View File

@ -969,8 +969,10 @@ en:
%{stderr} %{stderr}
ssh_bad_exit_status_muted: |- ssh_bad_exit_status_muted: |-
The SSH command responded with a non-zero exit status. The SSH command responded with a non-zero exit status. Vagrant
Vagrant assumes that this means the command failed! 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_connect_eacces: |-
SSH is getting permission denied errors when attempting to connect 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 to the IP for SSH. This is usually caused by network rules and not being