From b30f4688cdf905c4abd1b5596f9c37281dbb0614 Mon Sep 17 00:00:00 2001 From: Timothy Appnel Date: Tue, 31 Jul 2012 16:59:45 -0400 Subject: [PATCH] concatenating stdout and stderr in runner/__init__'s _low_level_exec_command. --- lib/ansible/runner/__init__.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py index acf41e5a988..4468f107c1c 100644 --- a/lib/ansible/runner/__init__.py +++ b/lib/ansible/runner/__init__.py @@ -616,9 +616,16 @@ class Runner(object): stdin, stdout, stderr = conn.exec_command(cmd, tmp, sudo_user, sudoable=sudoable) if type(stdout) != str: - return "\n".join(stdout.readlines()) + out = "\n".join(stdout.readlines()) else: - return stdout + out = stdout + + if type(stderr) != str: + err = "\n".join(stderr.readlines()) + else: + err = stderr + + return out + err # *****************************************************