|
|
@ -453,7 +453,7 @@ class ActionBase(ABC):
|
|
|
|
output = 'Authentication failure.'
|
|
|
|
output = 'Authentication failure.'
|
|
|
|
elif result['rc'] == 255 and self._connection.transport in ('ssh',):
|
|
|
|
elif result['rc'] == 255 and self._connection.transport in ('ssh',):
|
|
|
|
|
|
|
|
|
|
|
|
if self._play_context.verbosity > 3:
|
|
|
|
if display.verbosity > 3:
|
|
|
|
output = u'SSH encountered an unknown error. The output was:\n%s%s' % (result['stdout'], result['stderr'])
|
|
|
|
output = u'SSH encountered an unknown error. The output was:\n%s%s' % (result['stdout'], result['stderr'])
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
output = (u'SSH encountered an unknown error during the connection. '
|
|
|
|
output = (u'SSH encountered an unknown error during the connection. '
|
|
|
@ -468,7 +468,7 @@ class ActionBase(ABC):
|
|
|
|
'Failed command was: %s, exited with result %d' % (cmd, result['rc']))
|
|
|
|
'Failed command was: %s, exited with result %d' % (cmd, result['rc']))
|
|
|
|
if 'stdout' in result and result['stdout'] != u'':
|
|
|
|
if 'stdout' in result and result['stdout'] != u'':
|
|
|
|
output = output + u", stdout output: %s" % result['stdout']
|
|
|
|
output = output + u", stdout output: %s" % result['stdout']
|
|
|
|
if self._play_context.verbosity > 3 and 'stderr' in result and result['stderr'] != u'':
|
|
|
|
if display.verbosity > 3 and 'stderr' in result and result['stderr'] != u'':
|
|
|
|
output += u", stderr output: %s" % result['stderr']
|
|
|
|
output += u", stderr output: %s" % result['stderr']
|
|
|
|
raise AnsibleConnectionFailure(output)
|
|
|
|
raise AnsibleConnectionFailure(output)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|