Make /usr/bin/ansible output realtime and also delete some code!

This commit is contained in:
Michael DeHaan 2012-03-26 21:17:11 -04:00
parent eb67a91c57
commit 45a455a805
4 changed files with 55 additions and 63 deletions

View file

@ -494,7 +494,10 @@ class Runner(object):
def _executor(self, host):
try:
return self._executor_internal(host)
(host, ok, data) = self._executor_internal(host)
if not ok:
self.callbacks.on_unreachable(host, data)
return (host, ok, data)
except errors.AnsibleError, ae:
msg = str(ae)
self.callbacks.on_unreachable(host, msg)