From 09a0b9bea81710b151644c49cb6e9a331530ad6e Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Thu, 12 Apr 2012 21:18:09 -0400 Subject: [PATCH] If the module return is not parsed, always show stderr information even if -D (debug) is not specified. This will help for users that don't have prerequisites installed (like python-simplejson on old RHEL) and do not know to run -D. --- lib/ansible/runner.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ansible/runner.py b/lib/ansible/runner.py index 8c54017c2d..f40dfa3262 100755 --- a/lib/ansible/runner.py +++ b/lib/ansible/runner.py @@ -640,8 +640,9 @@ class Runner(object): else: self.callbacks.on_ok(host, data) - if self.debug and err: - self.callbacks.on_error(host, err) + if err: + if self.debug or data.get('parsed', True) == False: + self.callbacks.on_error(host, err) return result